I actually tried this before, and I tried again just now. No luck
new UglifyJsPlugin({
compress: {
warnings: false,
dead_code: false,
pure_funcs: [
"_elm_lang$core$Native_Utils.update",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9",
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
"F8",
"F9",
],
},
}),
EDIT: I was wrong. I thought setting dead_code: false would disable dead code elimination but apparently not.
Solution:
/* Minify the compiled JavaScript. */
new UglifyJsPlugin({
compress: {
warnings: false,
},
output: {
comments: false,
},
}),
Source: https://github.com/halfzebra/create-elm-app/issues/243