Skip to content
Snippets Groups Projects
webpack.prod.js 316 B
Newer Older
  • Learn to ignore specific revisions
  • const merge = require("webpack-merge")
    const common = require("./webpack.common.js")
    const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
      .BundleAnalyzerPlugin
    
    module.exports = (env) =>
      merge(common, {
        mode: "production",
        plugins: env && env.analyze ? [new BundleAnalyzerPlugin()] : [],
      })