Reserved JS keywords are not allowed as CSS modules class names #14050
Labels
bug: upstream
Bug in a dependency of Vite
enhancement
New feature or request
p2-nice-to-have
Not breaking anything but nice to have (priority)
Describe the bug
When using CSS modules and importing to obtain computed class names, classes named using a JS reserved keywords are not available and return undefined.
There is no console warning or information in the documentation about that, and this test works on Webpack and Parcel.
As the following code is valid in JS, I don't think it should be a problem to support it:
Reproduction
https://stackblitz.com/edit/vitejs-vite-qmdhmt?file=main.js
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: