vite-plugin-typed-css-modules
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

vite-plugin-typed-css-modules

Generates typed definitions for css modules using typed-css-modules.

The plugin will set the vite config field css.modules.localsConvention to camelCaseOnly and sets the camelCase option in typed-css-modules.

Using the vite dev server watcher, any time a [name].module.css file is edited a [name].module.css.d.ts file will be rewritten.

Installation

npm install vite-plugin-typed-css-modules

Usage

// vite.config.js

import typedCssModulesPlugin from "vite-plugin-typed-css-modules";

/** @type {import('vite').UserConfig} */
const config = {
  plugins: [typedCssModulesPlugin()],
};

export default config;

Readme

Keywords

Package Sidebar

Install

npm i vite-plugin-typed-css-modules

Weekly Downloads

163

Version

0.3.0

License

MIT

Unpacked Size

6.73 kB

Total Files

6

Last publish

Collaborators

  • joelhowse