Skip to content

Instantly share code, notes, and snippets.

@balupton
Created February 3, 2017 16:00
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save balupton/4bb9efe0928dc6e326fd41a3b22cd2cc to your computer and use it in GitHub Desktop.
Save balupton/4bb9efe0928dc6e326fd41a3b22cd2cc to your computer and use it in GitHub Desktop.
next.js webpack configs
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