Skip to content

Commit

Permalink
Remove the "modules: false" option from Babel
Browse files Browse the repository at this point in the history
The Babel option "modules: false" can't be used with the add-module-exports, which is needed for Calypso to compile.
This means we can't take advantage of WebPack2 tree-shaking yet, thus adding 50KB to the JS bundle.
More info:
59naga/babel-plugin-add-module-exports#39 (comment)
Automattic/wp-calypso#10799
Automattic/wp-calypso#11204
  • Loading branch information
Daniel Rey Lopez committed Feb 20, 2017
1 parent ccfb169 commit 31a39b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const babelSettings = {
[ 'env', {
useBuiltIns: true,
targets: { browsers },
modules: false,
// modules: false, // add-module-exports breaks with WebPack 2 and modules: false
} ],
'stage-1',
'react'
Expand Down

0 comments on commit 31a39b7

Please sign in to comment.