Skip to content

Commit

Permalink
Ensure that chunks do not emit assets to the same filename in develop…
Browse files Browse the repository at this point in the history
…ment mode
  • Loading branch information
sebinsua committed Mar 24, 2020
1 parent b984ee4 commit 33cf366
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ module.exports = function(webpackEnv) {
// In development, it does not produce real files.
filename: isEnvProduction
? 'static/js/[name].[contenthash:8].js'
: isEnvDevelopment && 'static/js/bundle.js',
: // error Error: Conflict: Multiple chunks emit assets to the same filename static/js/bundle.js
// (chunks main and vendors-node_modules_chalk_index_js-node_modules_css-loader_dist_runtime_api_js-node_modules_-5ede04)
isEnvDevelopment && 'static/js/[name].js',
// Webpack 5 Change: removal of `futureEmitAssets` which is the default in Webpack 5.
// See https://github.com/facebook/create-react-app/pull/6696#issue-263094759
// futureEmitAssets: true,
Expand Down

0 comments on commit 33cf366

Please sign in to comment.