-
-
Save ofarukcaki/89a81f6ee8dc3bdc58f14aee92fd657f to your computer and use it in GitHub Desktop.
next.js webpack configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
webpack: (config) => { | |
const webpack = require('webpack') | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |
config.plugins = config.plugins || [] | |
config.plugins.push(new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/)) | |
config.plugins.push(new BundleAnalyzerPlugin()) | |
return config | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment