vite-plugin-sass-dts weekly downloads statistics
By activeguild · npm · Vite plugins
A plugin that automatically creates a type file when using the css module type-safely.
vite-plugin-sass-dts has 99,290 recorded weekly downloads on npm, an increase of 20.3% over the past 30 days, ranking #640 of 3,247 tracked listings.
About vite-plugin-sass-dts
vite-plugin-sass-dts
A plugin that automatically creates a type file when using the CSS module type-safely.
Demo
<img src="https://user-images.githubusercontent.com/39351982/138745772-8b218863-fe28-4573-a86a-fc10a7ab1ac7.gif" width="600" />Install
npm i -D vite-plugin-sass-dts
For version 1.3.27 or later, please use the latest sass-embedded package; we have confirmed that it does not work with the sass package.
This plugin requires Vite 7 or later (vite: ^7 || ^8). Sass files are compiled with the modern Sass API (modern / modern-compiler) by default. The legacy Sass API (api: 'legacy') is no longer supported since Vite 7.
Options
| Parameter | Type | Description |
|---|---|---|
| enabledMode | string[] | Create d.ts files for css modules of file extension css, sass, scss included in the project at build time.<br /><br>Valid enumerations 'development' and 'production'. By default it is enabled only for development.<br>We recommend that you turn off the flag once you have created the d.ts file, as it will take a long time to build. (default [development]) |
| global.generate | boolean | Outputs the common style set in <b>additionalData</b> of <b>preprocessorOptions</b> as a global type definition file. |
| global.outputFilePath | string | Specify the file that outputs the global common style with an absolute path.Relative paths will be supported. |
| typeName.replacement | string | (fileName: string) => string | Type name can be changed to any value. (default is the classname key as a string. e.g. theClassName: 'theClassName';) |
| exportName.replacement | string | (fileName: string) => string | Export name can be changed to any value. (default is 'classNames'. e.g. declare const classNames: { ... };) |
| outputDir | string | An absolute path to the output directory. If undefined, declaration files will be generated in the source directories. |
| sourceDir | string | An absolute path to your source code directory. The plugin will replace this path with outputDir option when writing declaration files. |
| esmExport | boolean | Specify dts export type. If enabled, going to use ESM style export export default .... Otherwise export = .... |
| prettierFilePath | string | Specify the path to the prettier configuration file. |
| formatter | 'prettier' | 'biome' | Specify the formatter used for the generated d.ts files. When set to biome, install @biomejs/js-api and @biomejs/wasm-nodejs as devDependencies. (default: prettier)… |
Description from the npm listing.
- vite
- vite-plugin
- css
- scss
- classnames
- clsx
- typescript
- generics
- cssmodules
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm Vite plugins plugins
All 20 vite-plugin-sass-dts alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/vite-plugin-sass-dts. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.