mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Minify DEV bundles with closure (#29809)
The goal is to improve speed of the development by inlining and DCE unused branches. We have the ability to preserve some variable names and pretty print in the production version so might as well do the same with DEV.
This commit is contained in:
committed by
GitHub
parent
20b6f4c0e8
commit
c2ae9e28bc
@@ -43,6 +43,7 @@ function willCoercionThrow(value: mixed): boolean {
|
||||
}
|
||||
}
|
||||
|
||||
/** @noinline */
|
||||
function testStringCoercion(value: mixed) {
|
||||
// If you ended up here by following an exception call stack, here's what's
|
||||
// happened: you supplied an object or symbol value to React (as a prop, key,
|
||||
|
||||
@@ -361,7 +361,8 @@ function getPlugins(
|
||||
const isProduction = isProductionBundleType(bundleType);
|
||||
const isProfiling = isProfilingBundleType(bundleType);
|
||||
|
||||
const needsMinifiedByClosure = isProduction && bundleType !== ESM_PROD;
|
||||
const needsMinifiedByClosure =
|
||||
bundleType !== ESM_PROD && bundleType !== ESM_DEV;
|
||||
|
||||
return [
|
||||
// Keep dynamic imports as externals
|
||||
|
||||
Reference in New Issue
Block a user