Ionic 2: ReferenceError: webpackJsonp is not defined

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

2.0.0 

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,

...
<body>

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

  <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>

</body>
...

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注