node-sass currently suffers from a long-running issue where too many file handles are opened concurrently resulting in the build never finishing since node-sass will use up all the threads and keep waiting for more. You can read about the specifics here: sass/node-sass#857
The issue can be mitigated by increasing the thread-pool using process.env.UV_THREADPOOL_SIZE = 128 // max size, but given a larger project, as in my case, you'll hit the ceiling eventually.
I discovered this issue when migrating to rollup from webpack which didn't display the same issue. This seems to be because sass-loader implements a workaround using a queue which limits the amount of concurrent workers. You can see the implementation here: https://github.com/webpack-contrib/sass-loader/blob/2529c0716b1bca321c22d16636b1385682b1c730/lib/loader.js#L14
Since the original issue is three years old and seems unlikely to get a resolution anytime soon, I would suggest that a workaround similar to sass-loader is implemented in the sass-importer.
Thoughts? Alternative solutions? 🙂
node-sasscurrently suffers from a long-running issue where too many file handles are opened concurrently resulting in the build never finishing since node-sass will use up all the threads and keep waiting for more. You can read about the specifics here: sass/node-sass#857The issue can be mitigated by increasing the thread-pool using
process.env.UV_THREADPOOL_SIZE = 128 // max size, but given a larger project, as in my case, you'll hit the ceiling eventually.I discovered this issue when migrating to rollup from webpack which didn't display the same issue. This seems to be because
sass-loaderimplements a workaround using a queue which limits the amount of concurrent workers. You can see the implementation here: https://github.com/webpack-contrib/sass-loader/blob/2529c0716b1bca321c22d16636b1385682b1c730/lib/loader.js#L14Since the original issue is three years old and seems unlikely to get a resolution anytime soon, I would suggest that a workaround similar to
sass-loaderis implemented in the sass-importer.Thoughts? Alternative solutions? 🙂