Created
February 3, 2017 16:00
-
-
Save balupton/4bb9efe0928dc6e326fd41a3b22cd2cc to your computer and use it in GitHub Desktop.
next.js webpack configs
This file contains hidden or 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