title: Side effects when optimize webpack with Angular2
body: <p>I am trying to perform</p>
  
  <pre><code>webpack --optimize-minimize
  </code></pre>
  
  <p>on my Angular2 SPA and getting the following errors like these.</p>
  
  <pre><code>WARNING in ./wwwroot/dist/bundle.js from UglifyJs
  Side effects in initialization of unused variable OPERATORS [./~/angular2/src/co
  re/change_detection/parser/lexer.js:422,0]
  Side effects in initialization of unused variable freeExports [./~/rxjs/util/roo
  t.js:12,0]
  Side effects in initialization of unused variable freeModule [./~/rxjs/util/root
  .js:13,0]
  Dropping unused variable _CONTEXT_ACCESSOR [./~/angular2/src/core/change_detecti
  on/codegen_name_util.js:6,0]
  Side effects in initialization of unused variable ViewType [./~/angular2/src/cor
  e/linker/view_type.js:12,0]
  Dropping unused variable __unused [./~/angular2/src/common/pipes/async_pipe.js:3 ...
  </code></pre>
  
  <p>My webpack.config.js is this</p>
  
  <pre><code>module.exports = {
    "entry": "./Angular/boot",
    "output": {
      "filename": "./wwwroot/dist/bundle.js"
    },
    "resolve": {  
      "extensions": [ '', '.js', '.ts' ]
    },
    "module": {
      "loaders": [
        {
          "test": /\.ts/,
          "loaders": [ 'ts-loader' ],
          "exclude": /node_modules/
        }
      ]
    }
  };
  </code></pre>
  
  <p>When running the page I get a 'Maximum call stack size exceeded' so there is some circular referencing going on with the minified javascript.</p>
  
  <p>Help appreciated, many thanks</p>