title: Exporting a class with Webpack and Babel not working
body: <p>I have a very simple setup with Webpack and Babel for a small library.</p>
  
  <p>Before, I had the following architecture to generate a ES5 version of the library:</p>
  
  <pre><code>module.exports.lib = (function () {
      /* private part of library here */
  
      return {
          ... /* public part of library here */
      }
  })();
  </code></pre>
  
  <p>Everything is working fine this way, and I even had some ES6 features such as arrow functions inside my library and everything worked. However, I decided to change my approach to a ES6 class, this way:</p>
  
  <pre><code>export default class Library {
  
  }
  </code></pre>
  
  <p>And now, when I try to do:</p>
  
  <pre><code>var library = new Library();
  </code></pre>
  
  <p>I get that Library was not defined. Even just evaluating <code>Library</code> returns undefined.</p>
  
  <p>So what I did was turn the file that uses the library into an ES6 file that does <code>import Library from 'libraryfile.js'</code> and it worked again.</p>
  
  <p>However, I'd really like my output library to still be usable from regular ES5 with a <code>&lt;script&gt;</code> tag just like before. Is this possible?</p>
  
  <p>Here's my webpack config file:</p>
  
  <pre><code>module.exports = {
    entry: {
      pentagine: "./lib/pentagine.js",
      demos: ["./demos/helicopter_game/PlayState.js"]
    },
  
    output: {
      path: __dirname,
      filename: "./build/[name].js",
      libraryTarget: 'umd'
    },
  
    module: {
      loaders: [
        {
          test: /.js$/,
          loader: 'babel-loader',
          exclude: /node_modules/,
          query: {
            presets: ['es2015']
          }
        }
      ]
    }
  };
  </code></pre>