title: How to minify ES6 code using Webpack?
body: <p>I'm using webpack and want to deploy my site. If I minify and bundle my JavaScript code, I've got this error:</p>
  
  <blockquote>
    <p><strong>Parse error:</strong> Unexpected token: name (<code>Button</code>)</p>
  </blockquote>
  
  <p>Here is my not bundled code:</p>
  
  <pre><code>'use strict';
  
  export class Button { // &lt;-- Error happens on this line
      constructor(translate, rotate, text, textscale = 1) {
          this.position = translate;
          this.rotation = rotate;
          this.text = text;
          this.textscale = textscale;
      }
  }
  </code></pre>
  
  <p>Note in bundled code the keyword <code>export</code> is removed. In development, there are no errors thrown. Here you could find my configuration file of WebPack:</p>
  
  <pre><code>var webpack = require('webpack');
  
  var PROD = true;
  
  module.exports = {
      entry: "./js/entry.js",
      output: {
          path: __dirname,
          filename: PROD ? 'bundle.min.js' : 'bundle.js'
      },
      module: {
          loaders: [
              {
                  test: /\.css$/,
                  loader: "style-loader!css-loader"
              }
          ]
      },
      plugins: PROD ? [
          new webpack.optimize.UglifyJsPlugin({
              compress: { 
                  warnings: false 
              },
              output: {
                  comments: false,
              },
          })
      ] : []
  };
  </code></pre>
  
  <p>If I change <code>PROD</code> to false, I've no error, if true I've got error from above. My question is can I enable ES6 in Webpack?</p>