const webpack = require("webpack")
const webpackMerge = require("webpack-merge")
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin")
const TerserPlugin = require("terser-webpack-plugin")
const HoneybadgerSourceMapPlugin = require("@honeybadger-io/webpack")

const sharedConfig = require("./webpack.shared.config.js")

const { HOST, HONEYBADGER_API_KEY, npm_package_gitHead: revision } = process.env

const PRODUCTION_ASSETS_URL = `https://${HOST}`

module.exports = webpackMerge.smart({
  mode: "production",
  devtool: "source-map",
  optimization: {
    minimizer: [
      new TerserPlugin({ sourceMap: true, parallel: true }),
      new OptimizeCSSAssetsPlugin({}),
    ],
  },
  plugins: [
    new HoneybadgerSourceMapPlugin({
      apiKey: HONEYBADGER_API_KEY,
      assetsUrl: PRODUCTION_ASSETS_URL,
      revision,
    }),
  ],
}, sharedConfig)

@@ -504,16 +504,30 @@
 e.smart(
+sharedConfig, 
 %7B%0A  mode
@@ -873,20 +873,6 @@
 %5D,%0A%7D
-, sharedConfig
 )%0A

Use shared webpack config as default