From b34e7cf7c778c46225ab878695e3337c4989614a Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 10 Mar 2017 15:09:54 +0000 Subject: [PATCH] Revert "should improve console output" This breaks the FB bundles. This reverts commit 65f11ee64f678c387cb3cfef9a8b28b89a6272b9. --- scripts/rollup/build.js | 5 +++-- scripts/rollup/modules.js | 15 --------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index 68ab5968bf497..2c3911e2e21b9 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -17,7 +17,6 @@ const { replaceInternalModules, getFbjsModuleAliases, replaceFbjsModuleAliases, - getExternalModuleList, } = require('./modules'); const { bundles, @@ -205,7 +204,9 @@ function createBundle({babelOpts, entry, fbEntry, config, paths, name, hasteName return rollup({ entry: bundleType === bundleTypes.FB ? fbEntry : entry, plugins: getPlugins(entry, babelOpts, paths, filename, bundleType), - external: getExternalModuleList(), + external: [ + 'react', + ], }).then(({write}) => write( updateBundleConfig(config, filename, format, bundleType, hasteName) )).catch(console.error); diff --git a/scripts/rollup/modules.js b/scripts/rollup/modules.js index 07ca3e994dfce..91c21c87122b7 100644 --- a/scripts/rollup/modules.js +++ b/scripts/rollup/modules.js @@ -150,20 +150,6 @@ function replaceFbjsModuleAliases(bundleType) { } } -function getExternalModuleList() { - // this is to stop Rollup spamming the console with warnings - return [ - 'react', - 'warning', - 'emptyFunction', - 'emptyObject', - 'react/lib/ReactCurrentOwner', - 'react/lib/checkPropTypes', - 'react/lib/ReactDebugCurrentFrame', - 'react/lib/ReactComponentTreeHook', - ]; -} - module.exports = { createModuleMap, getExternalModules, @@ -171,5 +157,4 @@ module.exports = { getInternalModules, getFbjsModuleAliases, replaceFbjsModuleAliases, - getExternalModuleList, };