Webpack: remove unneeded NormalModuleReplacementPlugin

It was adding 1 minute to build time, and the upstream issue is already fixed: https://github.com/remix-run/react-router/pull/5589
This commit is contained in:
Alex Gleason 2021-09-04 15:27:31 -05:00
parent 9700deeba5
commit 16470c605f
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -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',