Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve case of sass :export-ed variables when objectifying #70

Merged
merged 1 commit into from Feb 8, 2023
Merged

Preserve case of sass :export-ed variables when objectifying #70

merged 1 commit into from Feb 8, 2023

Conversation

zewish
Copy link
Contributor

@zewish zewish commented Feb 8, 2023

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:

{
  ":export": {
    "casesensitivevariable": "1px"
  }
}

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.

@zewish zewish changed the title Preserve case of sass exported variables when objectifying Preserve case of sass :export-ed variables when objectifying Feb 8, 2023
@ai ai merged commit dbb53a2 into postcss:main Feb 8, 2023
@ai
Copy link
Member

ai commented Feb 8, 2023

Sure. Let’s add it.

@ai
Copy link
Member

ai commented Feb 8, 2023

Released in 4.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants