diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index 88b22a90da..c9453f091d 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -271,9 +271,7 @@ function getCommonJsConfig(bundleType) { case NODE_PROD: return {}; case RN: - return { - ignore: ignoreReactNativeModules(), - }; + return {}; case FB_DEV: case FB_PROD: // Modules we don't want to inline in the bundle. @@ -481,6 +479,10 @@ function getPlugins(entry, babelOpts, paths, filename, bundleType, isRenderer, m // needs to happen after strip env commonjs(getCommonJsConfig(bundleType)) ); + } else { + plugins.push( + commonjs(getCommonJsConfig(bundleType)) + ); } // this needs to come last or it doesn't report sizes correctly plugins.push(