Skip to content

Instantly share code, notes, and snippets.

@beatak
Created June 21, 2018 23:39
Show Gist options
  • Save beatak/12f5ce8db3ca292fab184a9a990e0b59 to your computer and use it in GitHub Desktop.
Save beatak/12f5ce8db3ca292fab184a9a990e0b59 to your computer and use it in GitHub Desktop.
module.exports = {
cache: true,
parallel: true,
uglifyOptions: {
mangle: true,
compress: {
conditionals: true,
dead_code: true,
evaluate: true,
// Switch off all types of compression except those needed to convince
// react-devtools that we're using a production build
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,
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment