title: Webpack and angular 1 uglify plugin
body: <p>I'm getting the failed to instantiate module error when I use the uglify js plugin;
  It works just fine when I don't include any plugins, how can I minify it for production?
  This is my webpack config:</p>
  
  <pre><code>const webpack = require('webpack');
  
  module.exports = {
      entry: './src/app.js',
      vendor: ['angular'],
      output: {
          path: './dist',
          filename: 'bundle.js'
      },
      module: {
          loaders: [
              {
                  test: /\.css$/,
                  loader: 'style-loader!css-loader'
              }
          ]
      },
      plugins: [
          new webpack.optimize.UglifyJsPlugin()
      ],
      watch: true
  };
  </code></pre>
  
  <p>My app.js:</p>
  
  <pre><code>var angular = require('angular');
  require('angular-ui-router');
  global.jQuery = require('jquery');
  require('bootstrap');
  require("./css/style.css");
  
  angular.module('todoApp', ['ui.router']).config(require('./routes'));
  
  require('./services/todoService');
  
  require('./controllers/mainController');
  require('./controllers/homeController');
  require('./controllers/aboutController');
  </code></pre>