You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
I have recently upgraded my ionic-app-scripts from 1.3.7 to 3.0.1. As per the update instructions, I have also upgraded my webpack to the latest (3.8.1), and added the following to src/index.html <script src="build/vendor.js"></script>
This works fine on dev builds without the --prod flag and ionic serve
However when I build the app in --prod using ionic cordova build ios --prod, the process seems to stuck at this stage every time (or is painfully slow):
The terminal then becomes unresponsive I had to quit the terminal app so the process doesn't go on forever. With 1.3.7 building in AOT takes longer than building in dev, but usually takes no longer than 5 minutes.
Update:
After waiting to build for almost 20 mins, I got a out of memory error: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
I cannot replicate this issue in a brand new repo. But our app is much larger in size (1GB~ on disk: we have a lot of static assets and 500+ components).
After doing some research on other people's solutions, I finally manage to get a successful build after allocating 8GBs to node (8GBs!!!!)
@sharonswli what webpack version where you using before? I am assuming you now use 3.8.1. I run into the same situation upgrading to app-stricts 3.0.1 and webpack 3.8.1. Changing webpack to version 3.4.1 remedies the problem, 3.5.0 is the first webpack version introducing the slow build and huge memory usage. There is a related issue open in webpack repo webpack/webpack#5876
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
I have recently upgraded my ionic-app-scripts from
1.3.7
to3.0.1
. As per the update instructions, I have also upgraded my webpack to the latest (3.8.1), and added the following tosrc/index.html
<script src="build/vendor.js"></script>
This works fine on dev builds without the

--prod
flag andionic serve
However when I build the app in
--prod
usingionic cordova build ios --prod
, the process seems to stuck at this stage every time (or is painfully slow):The terminal then becomes unresponsive I had to quit the terminal app so the process doesn't go on forever. With
1.3.7
building in AOT takes longer than building in dev, but usually takes no longer than 5 minutes.Update:
After waiting to build for almost 20 mins, I got a out of memory error:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
I cannot replicate this issue in a brand new repo. But our app is much larger in size (1GB~ on disk: we have a lot of static assets and 500+ components).
After doing some research on other people's solutions, I finally manage to get a successful build after allocating 8GBs to node (8GBs!!!!)
Solution see here: #1036
in package.json
then running

npm run ionic:build
. Total build time took 24 whole minutes:What behavior are you expecting?
Update app scripts should be able to build with ngc in a reasonable amount of time.
Which @ionic/app-scripts version are you using?
3.0.1
Other information:
Ionic Info
The text was updated successfully, but these errors were encountered: