vite-plugin-sass-dts
vite-plugin-sass-dts copied to clipboard
This is a plugin that automatically creates a type file when using the CSS module type-safely.
Hi, In the example `react-sass`, I notice that for the common styles file (`src/assets/styles/_index.scss`), a different css module class is generated for every component that imports styles. For example, 2...
Could you provide an example for using prettierFilePath? From everything I tried, it is not working. Sometimes vite-plugin-sass-dts runs on a file and generate slightly different tabs at the beginning...
Is there a way to generate the type definitions only in CI? I would prefer to `.gitignore` the files locally and re-generate them in CI. Is this possible to do?
It would be nice if this plugin were able to run on non-bundled files as well. While developing, it's pretty common to not have everything exported (and thus, not included...
- [ ] Use [this options](https://ja.vitejs.dev/config/shared-options#css-lightningcss). - [ ] Using Lightning CSS to parse and extract class names. ([ref](https://github.com/activeguild/vite-plugin-sass-dts/blob/dd447487171a66d7f236f850974e7a381f186d0c/src/main.ts#L27))
When vite is configured to use modern or modern-compiler scss api from vite.config.ts and the module.scss file has a @use or @import with an alias, the plugin don't resolve it...
Thanks for your efforts, but something broke If I specify the api: "modern-compiler" then the files are not updated, once I specify the api: "legacy" and everything starts working I...
See also https://github.com/jens-duttke/scss-declaration-map-demo?tab=readme-ov-file sass-embedded can generate embedded source maps, which would result in: ``` /*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,*/ ``` being added to the end of the css file. I think this would...
Vite 7 released several days ago and [removed Sass legacy API support](https://vite.dev/guide/migration.html#removed-sass-legacy-api-support). After upgrade to Vite 7 when running an application I always see a lot of warnings in console...
The prettierFilePath does not respect prettier config if it is .json or .yml. I could only get it to work with .js / .cjs / .ts