rspack
rspack copied to clipboard
Build hangs when using :global selector in css module with apostrophes
System Info
Mac OS 13.6, Node 18, rspack 0.5.0
Details
While converting an old webpack project to rspack, I found a line of code that would hang the build process. Specifically:
// some.module.css :global('something') { ... }
I wasn't able to find if using apostrophes has any special meaning in this case or if it was a mistake when writing the code. Regardless, I would expect that the build either fails or ignores it instead of being stuck.
Reproduce link
https://github.com/martinkadlec0/rspack-global-bug/
Reproduce Steps
Clone repo Run: npm run build
Or just add the :global('something') to any css module.
This is caused by SWC, when parsing CSS with invalid apostrophes, it probably went into a infinite loop so we can't get the error result of it
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Seems to be fixed in 0.7 👍