UglifyJS Running Memory
I'm trying to minify a 24MB JavaScript file, but after about 10 minutes of execution time, the script exits with an out of memory error. Are there any flags that might help? I am using Windows 7 64-bit with 16GB physical memory.
C:\projects\test\js>uglifyjs -o ffmpeg.min.js ffmpeg.js
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
+3
Dane iracleous
source
to share
1 answer
This worked for me:
"scripts": {
"ugly": "node --max_old_space_size=4096 ./node_modules/uglify-js/bin/uglifyjs ffmpeg.js -c -o ffmpeg.min.js"
},
0
Adam Gerard
source
to share