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
When running pnpm dev:rspack, the generated class name is rspack-repro-_src_space_folder_render_module_css-text which works as expected, but for pnpm dev:rsbuild, it's src-space folder-render-module__text-DF713n in html and .src-space\ folder-render-module__text-DF713n in .css file.
Uncaught (in promise) InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('src-space folder-render-module__text-DF713n') contains HTML space characters, which are not valid in tokens.
at Module.render (render.js:6:1)
at index.js:2:1
The text was updated successfully, but these errors were encountered:
https://github.com/JounQin/rspack-css-modules-spaces
When running
pnpm dev:rspack
, the generated class name isrspack-repro-_src_space_folder_render_module_css-text
which works as expected, but forpnpm dev:rsbuild
, it'ssrc-space folder-render-module__text-DF713n
in html and.src-space\ folder-render-module__text-DF713n
in.css
file.And it's not possible to escape spaces into html.
https://stackoverflow.com/questions/50812118/is-it-possible-to-use-the-space-character-in-css-class-names
The original
el.classList.add(styles.text)
throws:https://github.com/JounQin/rspack-css-modules-spaces/blob/4d081a81dafb914b63d3800e06cc3bb62032224c/src/render.js#L5
The text was updated successfully, but these errors were encountered: