Skip to content

Instantly share code, notes, and snippets.

@rowanoulton
Created January 16, 2018 17:33
Show Gist options
  • Save rowanoulton/44ec3424ac1e86b63316d522e1b99a16 to your computer and use it in GitHub Desktop.
Save rowanoulton/44ec3424ac1e86b63316d522e1b99a16 to your computer and use it in GitHub Desktop.
new UglifyJsPlugin({
uglifyOptions: {
compress: {
arrows: false,
booleans: false,
cascade: false,
collapse_vars: false,
comparisons: false,
computed_props: false,
hoist_funs: false,
hoist_props: false,
hoist_vars: false,
if_return: false,
inline: false,
join_vars: false,
keep_infinity: true,
loops: false,
negate_iife: false,
properties: false,
reduce_funcs: false,
reduce_vars: false,
sequences: false,
side_effects: false,
switches: false,
top_retain: false,
toplevel: false,
typeofs: false,
unused: false,
// Switch off all types of compression except those needed to convince
// react-devtools that we're using a production build
conditionals: true,
dead_code: true,
evaluate: true,
},
mangle: true,
},
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment