Skip to content

Commit

Permalink
Do not use add-module-exports. Also remove react-hot-loader
Browse files Browse the repository at this point in the history
sokra says not to: webpack/webpack#2631 (comment)
it breaks b/c tries to insert

exports['default'] = module;
  • Loading branch information
samouri committed Oct 11, 2017
1 parent 1bef60a commit 50fa7a8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const UseMinifiedFiles = require( './server/bundler/webpack-plugins/use-minified
const babelConfig = JSON.parse( fs.readFileSync( './.babelrc', { encoding: 'utf8' } ) );

babelConfig.presets[ 0 ][ 1 ].modules = false;
babelConfig.plugins = _.without( babelConfig.plugins, 'add-module-exports' );

/**
* Internal variables
Expand Down Expand Up @@ -152,10 +153,7 @@ const webpackConfig = {
new webpack.IgnorePlugin( /^props$/ ),
new CopyWebpackPlugin( [ { from: 'node_modules/flag-icon-css/flags/4x3', to: 'images/flags' } ] ),
new HappyPack( {
loaders: _.compact( [
process.env.NODE_ENV === 'development' && 'react-hot-loader',
babelLoader
] )
loaders: [ babelLoader ]
} ),
new webpack.NamedModulesPlugin(),
new webpack.NamedChunksPlugin( chunk => {
Expand Down

0 comments on commit 50fa7a8

Please sign in to comment.