webpack - rebuild by updating files under node_modules with #module-source-map makes heap out of memory -
- node@6.2.2
- webpack@1.12.15
- devtool: #module-source-map
when update files under project, rebuild fast
but when update files under node_modules, takes lot of time(even display 1/1 build modules) , makes heap out of memory
here's logs
<--- last few gcs ---> 277985 ms: mark-sweep 1218.5 (1435.0) -> 1213.7 (1435.0) mb, 1232.2 / 0 ms [allocation failure] [gc in old space requested]. 279006 ms: mark-sweep 1213.7 (1435.0) -> 1213.7 (1435.0) mb, 1020.8 / 0 ms [allocation failure] [gc in old space requested]. 280087 ms: mark-sweep 1213.7 (1435.0) -> 1213.6 (1435.0) mb, 1080.4 / 0 ms [last resort gc]. 281358 ms: mark-sweep 1213.6 (1435.0) -> 1213.6 (1435.0) mb, 1271.5 / 0 ms [last resort gc]. <--- js stacktrace ---> ==== js stack trace ========================================= security context: 0xc3785fc9e59 <js object> 1: node [/users/jared/project/module-name/node_modules/.npminstall/webpack-core/0.6.8/webpack-core/lib/originalsource.js:~53] [pc=0xbae9b454acb] (this=0x38b12b4e66c9 <an originalsource map 0x2cfe7ecd6181>,options=0x27c599c611c9 <an object map 0x2cfe7ec6e061>) 2: node [/users/jared/project/module-name/node_modules/.npminstall/webpack-core/0.6.8/webpack-core/lib/replacesource.js:~62] [pc=0xbae9b452f... fatal error: call_and_retry_last allocation failed - javascript heap out of memory
node sets maximum size limit of heap 1.7 gb. can increase heap node process.
node --max_old_space_size=2048 node_modules/webpack/bin/webpack.js --config config/webpack.prod.js
here 2048 means 2 gb, can change per requirement.
Comments
Post a Comment