92% Chunk Asset Optimization - Webpack
Solution 1:
I too faced similar issue while running build remotely, So, in jenkin after adding following command, problem got resolved for me.
export"NODE_OPTIONS=--max_old_space_size=2000"
Solution 2:
Run ng serve --sourceMap=false
Solution 3:
I do a yarn cache cleaning and it fixed my issue "92% chunk asset optimization TerserPlugin" on my Ubuntu 16.04 host on google cloud.
Not sure if it works on your machine
yarn cache clean
I have this issue on 2nd machine, and this machine requires a reboot.
sudo reboot
Solution 4:
I've had great success using a combination of the following:
https://github.com/mzgoddard/hard-source-webpack-plugin
and
https://github.com/amireh/happypack
HardSourceWebpackPlugin is a plugin for webpack to provide an intermediate caching step for modules. In order to see results, you'll need to run webpack twice with this plugin: the first build will take the normal amount of time. The second build will be signficantly faster.
HappyPack makes initial webpack builds faster by transforming files in parallel.
Report back and let me know how it goes.
Solution 5:
For me 92% chunk asset was taking forever, so I decided to let it run overnight, after it later I received the following error:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Answer : The core problem is that node comes with a default memory restriction to 1.76 GB. If you need more you need to set the option --max_old_space_size={desiredSize} when you start a node process.
Try to increase the memory limit:
Post a Comment for "92% Chunk Asset Optimization - Webpack"