ionic3 ionic serve build fail Error: webpackJsonP is not defined

ionic升级后发现 ionic serve 跑起来项目出现一下错误:

Runtime Error: webpackJsonP is not defined
Stack: @http://localhost:8100/build/main.js:1:1

你可以参考这样做:

rm -rf node_modules
在index.html中添加
npm install -g ionic@latest
npm install @ionic/app-scripts@latest --save-dev
npm install ionic-angular@latest --save
npm upgrade 用于升级所有模块。

 

具体关于在index.html添加vendor.js参考官网:https://gist.github.com/anditola/ab8c0d1752d1a6f6106076dc98e05216

你可能感兴趣的:(ionic3 ionic serve build fail Error: webpackJsonP is not defined)