title: webpackJsonp is not defined
body: <h2>Codes</h2>
  
  <p>This is my webpack.babel.js</p>
  
  <p>entry section:</p>
  
  <pre><code>entry: {
     vendor: [
         "react",
         "react-dom"
      ]
  }
  
  // 自动获取路径(主动获取写的逻辑代码)
  let files = glob.sync('./src/**/index.js'),
      newEntries = files.reduce(function (memo , file) {
          let name = /.*\/(.*?)\/index\.js/.exec(file)[1];
  
          memo[name] = entry(name);
  
          return memo;
      }, {});
  
  config.entry = Object.assign({} , config.entry , newEntries);
  
  function entry(name) {
      return './src/js/' + name + '/index.js';
  }
  </code></pre>
  
  <p>output section:</p>
  
  <pre><code>output: {
      path: path.join(__dirname,"/dist/js/"),
      filename: "[name].js"
  },
  </code></pre>
  
  <p>module section:</p>
  
  <pre><code> module: {
  
          // 将非js的资源 或者 非es5 资源 转化为合适的 js 资源 
          loaders: [{
              test: /\.js$/,
              exclude: /node_modules/,
              loader: 'babel',
              query: {
                  presets: [
                      'es2015',
                      'stage-0',
                      'react'
                  ]
              } 
          }]
      },
  
      // 第三方库合并
      plugins: [
          new webpack.optimize.CommonsChunkPlugin('vendor' , 'vendor.bundle.js')
      ]
  }
  </code></pre>
  
  <p>I use webpack loading in my React code (home.js)</p>
  
  <h2>Problem</h2>
  
  <p>I want to load my script however I meet some ReferenceError.</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: webpackJsonp is not defined</p>
  </blockquote>
  
  <p>I am loading vendor.bundle.js bundle file right before home.js</p>
  
  <pre><code>&lt;script src="../../dist/js/vendor.bundle.js"&gt;&lt;/script&gt;
  &lt;script src="../../dist/js/home.js"&gt;&lt;/script&gt;
  </code></pre>