Preserve case of sass :export-ed variables when objectifying #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We're currently using a Vite plugin (vite-plugin-sass-dts) to generate *.d.ts files from *.module.scss in our project. This tool uses the
objectify()
function internally to generate the class names list before exporting them to type definitions. Unfortunately our ":export { caseSensitiveVariable: 1px }" gets objectified to the following object:I used patch-package to run this on our side and it seems to fix the issue.
For me this seems the easiest place to fix this since, I'm pretty sure other tools dependent on this package might also need this issue fixed.