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