title: Importing Quill to React app throws "React is not defined", "Unexpected token import"
body: <p>I'm trying to get Quill to work on my React app but depending on my webpack config it throws two errors:</p>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected token import</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>Uncaught ReferenceError: React is not defined</p>
  </blockquote>
  
  <p>Please note that I'm not using react-quill nor create-react-app.</p>
  
  <p>Solving the first error produces another, I've read that I need to make an exception in webpack to allow it to import from quill folder.</p>
  
  <pre><code>exclude: /node_modules/
  </code></pre>
  
  <p>into </p>
  
  <pre><code>/node_modules(?!\/quill)/
  </code></pre>
  
  <p>Now it throws the second error. </p>
  
  <p>My webpack config file:</p>
  
  <pre><code>module.exports = {
    entry: [
      './src/index.js'
    ],
    output: {
      path: __dirname,
      publicPath: '/',
      filename: 'bundle.js'
    },
    module: {   
      loaders: [{
        exclude: /node_modules(?!\/quill)/,
        loader: 'babel',
        query: {
          presets: ['react', 'es2015', 'stage-1']
        }
      }]
    },
    resolve: {
      extensions: ['', '.js', '.jsx']
    },
    devServer: {
      historyApiFallback: true,
      contentBase: './'
    }
  };
  </code></pre>
  
  <p>I'm using basic code from Quill docs to import what's needed:</p>
  
  <pre><code>import React, { Component } from 'react';
  
  import Quill from 'quill/core';
  
  import Toolbar from 'quill/modules/toolbar';
  import Snow from 'quill/themes/snow';
  
  import Bold from 'quill/formats/bold';
  import Italic from 'quill/formats/italic';
  import Header from 'quill/formats/header';
  
  Quill.register({
    'modules/toolbar': Toolbar,
    'themes/snow': Snow,
    'formats/bold': Bold,
    'formats/italic': Italic,
    'formats/header': Header
  });
  class Tutorial extends Component {
      constructor(props){
          super(props);
          this.editor = null;
      }
      render(){
          return (
              &lt;div className="verb-container"&gt;
                  &lt;div className="editor"&gt;&lt;/div&gt;
              &lt;/div&gt;
          );
      }
  }
  
  export default Tutorial;
  </code></pre>
  
  <p>When I import just: </p>
  
  <pre><code>import Quill from 'quill';
  </code></pre>
  
  <p>or</p>
  
  <pre><code>import Quill from 'quill/core';
  </code></pre>
  
  <p>A basic editor appears if I initialize it like this:</p>
  
  <blockquote>
    <p>this.editor = new Quill('.editor');</p>
  </blockquote>
  
  <p>But when I try to import </p>
  
  <pre><code>import Snow from 'quill/themes/snow';
  </code></pre>
  
  <p>It shows:</p>
  
  <blockquote>
    <p>React is not defined</p>
  </blockquote>
  
  <p>If I missed any important information, please let me know.</p>