Skip to content

Commit

Permalink
Revert "should improve console output"
Browse files Browse the repository at this point in the history
This breaks the FB bundles.

This reverts commit 65f11ee.
  • Loading branch information
gaearon committed Mar 10, 2017
1 parent 7f6ecb1 commit b34e7cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
5 changes: 3 additions & 2 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const {
replaceInternalModules,
getFbjsModuleAliases,
replaceFbjsModuleAliases,
getExternalModuleList,
} = require('./modules');
const {
bundles,
Expand Down Expand Up @@ -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);
Expand Down
15 changes: 0 additions & 15 deletions scripts/rollup/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,26 +150,11 @@ 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,
replaceInternalModules,
getInternalModules,
getFbjsModuleAliases,
replaceFbjsModuleAliases,
getExternalModuleList,
};

0 comments on commit b34e7cf

Please sign in to comment.