Skip to content

Commit c9d1a50

Browse files
committed
feat($config): Enable dead code elimination and tell UglifyJS about the pure functions from Elm
1 parent db4986d commit c9d1a50

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

config/webpack.config.prod.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,27 @@ module.exports = {
183183
// Minify the compiled JavaScript.
184184
new UglifyJsPlugin({
185185
compress: {
186-
warnings: false
186+
warnings: false,
187+
dead_code: true,
188+
pure_funcs: [
189+
'_elm_lang$core$Native_Utils.update',
190+
'A2',
191+
'A3',
192+
'A4',
193+
'A5',
194+
'A6',
195+
'A7',
196+
'A8',
197+
'A9',
198+
'F2',
199+
'F3',
200+
'F4',
201+
'F5',
202+
'F6',
203+
'F7',
204+
'F8',
205+
'F9'
206+
]
187207
},
188208
output: {
189209
comments: false

0 commit comments

Comments
 (0)