Skip to content

Instantly share code, notes, and snippets.

@rowanoulton
Created January 16, 2018 17:33
Show Gist options
  • Select an option

  • Save rowanoulton/44ec3424ac1e86b63316d522e1b99a16 to your computer and use it in GitHub Desktop.

Select an option

Save rowanoulton/44ec3424ac1e86b63316d522e1b99a16 to your computer and use it in GitHub Desktop.

Revisions

  1. rowanoulton created this gist Jan 16, 2018.
    38 changes: 38 additions & 0 deletions webpack.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    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,
    },
    }),