Skip to content

Instantly share code, notes, and snippets.

@philippegirard
Created August 5, 2021 12:47
Show Gist options
  • Save philippegirard/99e40acc52a35f7fc711690da4555882 to your computer and use it in GitHub Desktop.
Save philippegirard/99e40acc52a35f7fc711690da4555882 to your computer and use it in GitHub Desktop.
production.js
...
const TerserPlugin = require("terser-webpack-plugin");
environment.config.merge({
devtool: "hidden-source-map",
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
parallel: true,
cache: true,
sourceMap: false,
terserOptions: {
parse: {
ecma: 8,
},
compress: {
ecma: 5,
warnings: false,
comparisons: false,
},
mangle: {
safari10: true,
},
output: {
ecma: 5,
comments: false,
ascii_only: true,
},
},
}),
],
},
});
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment