Skip to content

Commit

Permalink
Webpack: remove unneeded NormalModuleReplacementPlugin
Browse files Browse the repository at this point in the history
It was adding 1 minute to build time, and the upstream issue is already fixed: remix-run/react-router#5589
  • Loading branch information
alexgleason committed Sep 4, 2021
1 parent 9700dee commit 16470c6
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions webpack/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ module.exports = {

plugins: [
new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))),
new webpack.NormalModuleReplacementPlugin(
/^history\//, (resource) => {
// temporary fix for https://github.com/ReactTraining/react-router/issues/5576
// to reduce bundle size
resource.request = resource.request.replace(/^history/, 'history/es');
},
),
new MiniCssExtractPlugin({
filename: 'packs/css/[name]-[contenthash:8].css',
chunkFilename: 'packs/css/[name]-[contenthash:8].chunk.css',
Expand Down

0 comments on commit 16470c6

Please sign in to comment.