Tuesday, March 12, 2019

Webpack config changes to avoid random chunks names


In React-scripts created project, extract the webpack.config.js via running "react-script eject"

Update react.config.js:
- Find new MiniCssExtractPlugin(..) and delete "[contenthash:8]"
- Find output.filename and output.chunkFilename and delete "[contenthash:8]"
- Set optimization.runtimeChunk to false to avoid inline JavaScript inside index.html

No comments:

Post a Comment