title: Unhandled promise rejection: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten
body: <p>I have tried to incorporate the Angular2 quickstart code into my current webpack build and it seems that something is overwriting the <code>zone.js</code> promise which is throwing this error. According to most of the stackoverflow posts I've seen, the <code>zone.js</code> file needs to be loaded after any files that may include promises.</p>
  
  <p>I'm assuming what is happening is that the html that has the <code>&lt;src&gt;</code> tag with the <code>zone.js</code> file is getting loaded before webpack loads the rest of the <code>node_module</code> files. </p>
  
  <p>Any ideas or suggestions?</p>
  
  <hr>
  
  <p>This is the <code>package.json</code> I'm using.</p>
  
  <pre><code>{
    "name": "site-pinger",
    "version": "1.0.0",
    "description": "",
    "scripts": {
      "build:watch": "webpack --colors --progress --watch",
      "build": "webpack --colors --progress",
      "start": "webpack-dev-server --progress --colors --hot --inline --port 3000"
    },
    "author": "",
    "license": "ISC",
    "standard": {
      "parser": "babel-eslint"
    },
    "babel": {
      "presets": [
        "latest",
        "stage-0"
      ]
    },
    "devDependencies": {
      "@types/jasmine": "2.5.36",
      "@types/node": "^6.0.46",
      "babel-core": "^6.17.0",
      "babel-eslint": "^7.0.0",
      "babel-loader": "^6.2.5",
      "babel-polyfill": "^6.16.0",
      "babel-preset-latest": "^6.16.0",
      "babel-preset-stage-0": "^6.16.0",
      "canonical-path": "0.0.2",
      "concurrently": "^3.2.0",
      "extract-text-webpack-plugin": "^2.1.0",
      "file-loader": "^0.9.0",
      "html-loader": "^0.4.5",
      "html-webpack-plugin": "^2.28.0",
      "jasmine-core": "~2.4.1",
      "json-loader": "^0.5.4",
      "karma": "^1.3.0",
      "karma-chrome-launcher": "^2.0.0",
      "karma-cli": "^1.0.1",
      "karma-jasmine": "^1.0.2",
      "karma-jasmine-html-reporter": "^0.2.2",
      "lodash": "^4.16.4",
      "protractor": "~4.0.14",
      "rimraf": "^2.5.4",
      "standard": "^8.4.0",
      "style-loader": "^0.13.2",
      "ts-loader": "^2.0.1",
      "tslint": "^3.15.1",
      "typescript": "~2.0.10",
      "url-loader": "^0.5.8",
      "webpack": "^2.1.0",
      "webpack-dev-server": "^2.4.1"
    },
    "dependencies": {
      "@angular/common": "~2.4.0",
      "@angular/compiler": "~2.4.0",
      "@angular/core": "~2.4.0",
      "@angular/forms": "~2.4.0",
      "@angular/http": "~2.4.0",
      "@angular/platform-browser": "~2.4.0",
      "@angular/platform-browser-dynamic": "~2.4.0",
      "@angular/router": "~3.4.0",
      "angular-in-memory-web-api": "~0.2.4",
      "systemjs": "0.19.40",
      "core-js": "^2.4.1",
      "rxjs": "5.0.1",
      "zone.js": "^0.7.4"
    },
    "repository": {}
  }
  </code></pre>
  
  <hr>
  
  <p>This is the <code>webpack.config.js</code> file</p>
  
  <pre><code>'use strict'
  
  const webpack = require('webpack')
  const ExtractTextPlugin = require('extract-text-webpack-plugin')
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  
  const devtool = 'source-map'
  
  const devServer = {
    historyApiFallback: true
  }
  
  const entry = {
    main: [
      'babel-polyfill',
      './src/main'
    ],
  }
  
  const output = {
    filename: '[name].js',
    path: __dirname + '/dist',
    publicPath: '/'
  }
  
  const extensions = [
    '.js',
    '.ts',
    '.css',
    '.html'
  ]
  
  const modules = [
    'node_modules',
    'lib'
  ]
  
  const rules = [{
    test: /.ts$/,
    exclude: /node_modules/,
    loaders: ['ts-loader']
  }, {
    test: /.js$/,
    exclude: /node_modules/,
    loaders: ['babel-loader']
  }, {
    test: /.css$/,
    loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' })
  }, {
    test: /.html$/,
    exclude: /node_modules/,
    include: /static/,
    loader: 'html-loader'
  }, {
    test: /.(ico|png|eot|svg|ttf|woff|woff2)$/,
    loader: 'url?limit=10000'
  }]
  
  const plugins = [
    new ExtractTextPlugin('[name].css'),
    new HtmlWebpackPlugin({
      hash: true,
      inject: 'head',
      template: 'static/index.html'
    }),
    new webpack.optimize.CommonsChunkPlugin({
      name: 'vendor',
      minChunks: Infinity
    })
  ]
  
  module.exports = {
    devtool,
    devServer,
    entry,
    output,
    resolve: {
      extensions,
      modules
    },
    module: {
      rules
    },
    plugins
  }
  </code></pre>
  
  <hr>
  
  <p>This is my index.html where I've manually included the <code>zone.js</code> file to ensure that their Promise doesn't get overwritten.</p>
  
  <pre><code>&lt;!doctype html&gt;
  
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Site Pinger&lt;/title&gt;
  
      &lt;script src="node_modules/core-js/client/shim.min.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/zone.js/dist/zone.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
  
      &lt;script src="../src/systemjs.config.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;app&gt;Loading AppComponent content here ...&lt;/app&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>