diff --git a/packages/shared/CheckStringCoercion.js b/packages/shared/CheckStringCoercion.js index 1a061b660177b..a186d6755d99e 100644 --- a/packages/shared/CheckStringCoercion.js +++ b/packages/shared/CheckStringCoercion.js @@ -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, diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index 2ade58493a5f2..df9fb00b09424 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -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