mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +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:
@@ -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