Ionic 2: ReferenceError: webpackJsonp is not defined

作者: wxfeng 分类: 未分类 发布时间: 2017-07-19 00:00    阅读 696 次


Breaking Changes

In order to speed up the bundling process, we have separated node_modules code into a new, generated file called vendor.js. This means that on every change, ionic-angular, @angular, etc won't need to be processed by webpack 🎉

This means that src/index.html must be modified to include a new vendor script tag <script src="build/vendor.js"></script>. This new script tag must be placed above the main.js script tag. For example,


  <!-- Ionic's root component and where the app will load -->

  <script src="cordova.js"></script>

  <!-- The polyfills js is generated during the build process -->
  <script src="build/polyfills.js"></script>

  <!-- all code from node_modules directory is here -->
  <script src="build/vendor.js"></script>

  <!-- The bundle js is generated during the build process -->
  <script src="build/main.js"></script>