scalajs-bundler
scalajs-bundler copied to clipboard
JavaScript heap out of memory on bundling
I am trying to use scalajs-bundler on our fairly big project and seeing this
[info 11:47:43:PM] Bundling the application with its NPM dependencies
[info 11:48:25:PM]
[error] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
[error 11:48:25:PM] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Looks like related to https://github.com/webpack/webpack/issues/2157, is there a way to pass --max_old_space_size=4096 flag to node using this plugin?
I guess this would work:
jsEnv := NodeJSEnv(args = Seq("--max_old_space_size=4096)).value
@sjrd, I'm not sure that would help: https://github.com/scalacenter/scalajs-bundler/blob/dddad3568a50e67c8d559c1aedaf4ef0c61ee6e3/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Webpack.scala#L125-L126