I'm new to Ionic. I have started project with super template. But when I try to run the app in browser. It throws an error saying:
1 2 | ReferenceError: webpackJsonp is not defined at http: //localhost:8100/build/main.js:1:1 |
解决:
This is a breaking change in Ionic-App-Scripts
https://github.com/ionic-team/ionic-app-scripts/releases/tag/v2.0.0
src/index.html must be modified to include a new vendor script tag .
<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>
厚积薄发,笨鸟先飞。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步