我有两个 git 分支,一个是开发,另一个是延迟加载。我在我的延迟加载分支中进行了延迟加载,但在“复制完成于 19.81 秒”之后卡住了 11 分钟,这样构建过程太慢了。非懒加载的开发分支,可以正常构建应用,但是启动时间太长。
我希望延迟加载分支在其构建过程中不应该花费很长时间。
我运行命令时的图像ionic cordova run android
webpack 似乎需要 11 分钟才能完成它的任务。
If you want to reduce the amount of work ionic has to do between builds while you're editing, try using the livereload flag. It will then only do a webpack update instead of a webpack full start and finish. This way you can make edits and test without having to run through the ~11 minute process every time.
ionic cordova run android --livereload
or
ionic serve
As for the long build time, I would need to see more of your code if this just started happening recently. However, on my project(s), when I'm building it can take over 10 minutes to build, especially when running with the --prod flag.
Also, always make sure you're on the latest of Ionic:
npm install @ionic/cloud-angular@latest --save
sudo npm update -g cordova
sudo npm update -g ionic