Restore elm optimizations for terser.

This commit is contained in:
Dillon Kearns 2020-05-11 15:22:28 -07:00
parent 29719cc428
commit 8f7bbc80b4

View File

@ -335,23 +335,22 @@ function webpackOptions(
minimizer: [
new TerserPlugin({
parallel: true,
/*
// TODO: Find a way to only apply this to files generated by Elm.
test: /\.elm$/i,
cache: true,
// The following options are suggested by Evan.
// See https://github.com/elm/compiler/blob/master/hints/optimize.md#instructions
terserOptions: {
compress: {
"pure_funcs": ["F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9"],
"pure_getters": true,
"keep_fargs": false,
"unsafe_comps": true,
"unsafe": true
pure_funcs: ["F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9"],
comparisons: false,
pure_getters: true,
keep_fargs: false,
unsafe_comps: true,
unsafe: true
},
mangle: {
safari10: true,
},
mangle: true,
}
*/
}),
]
},