You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
"RangeError: Maximum call stack size exceeded" when compiling a file with many requires #689
What is the expected behavior?
The expected behaviour is to generate a JS file, which can be compiled and executed.
Please mention other relevant information such as your webpack version, Node.js version and Operating System.
Reproducible on 0.28.10, Node 6.11.3 & Node 8.9.4.
Technical details
The issue is that URLs are replaced by requires and cssAsString in loader.js is built by string concatenation "..." + "..." + ... + "..." which has upper limit in each version of v8, given by it's default stack size.
Experimentally measured:
node 6.11.3 has ~6250 strings,
node 8.9.4 has ~3285 strings.
The fix is straightforward, group the string concatenations by fixed amount so it can be compiled using default stack size. ("..." + ... + "...") + ("..." + ... + "...")
Activity
alexander-akait commentedon Jul 6, 2018
fixed in https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#02811-2018-03-16
Gobie commentedon Sep 17, 2018
@evilebottnawi I believe this is a mistake, it refers issue #698, while this is #689.
alexander-akait commentedon Sep 17, 2018
@Gobie problem still exists?
Gobie commentedon Sep 17, 2018
It does on 1.0.0. Test case can be found in attached commit https://github.com/Gobie/css-loader/commit/ced2c0dc24e2a0af1ea39e1d30a5d5b8e26ffb3f with "half-baked" solution.
Gobie commentedon Sep 17, 2018
I mistakenly closed the related pull request #690 back in July, but it is still reproducible.
alexander-akait commentedon Sep 17, 2018
@Gobie Can you create new issue with minimum reproducible test repo?
Gobie commentedon Sep 17, 2018
I created #771 with minimal test-case to verify that it is broken.