Skip to content

Instantly share code, notes, and snippets.

@ofarukcaki
Forked from balupton/next.config.js
Created January 23, 2019 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ofarukcaki/89a81f6ee8dc3bdc58f14aee92fd657f to your computer and use it in GitHub Desktop.
Save ofarukcaki/89a81f6ee8dc3bdc58f14aee92fd657f 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