30.2.1 • Published 8 months ago

@modular-css/vite v30.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@modular-css/vite NPM Version NPM License NPM Downloads

Vite support for modular-css.

Install

> npm i @modular-css/vite

Usage

// vite.config.js
import mcss from "@modular-css/vite";

export default {
    plugins : [
        mcss()
    ]
};

Options

include/exclude

A minimatch pattern, or an array of minimatch patterns, relative to process.cwd(). include defaults to **/*.css.

processor

Pass an already-instantiated Processor instance to the vite plugin. It will then add any files found when traversing the modules to it and both the vite-discovered and any already-existing files will be output in the final CSS.

styleExport

You can disable returning the style string, eg import { styles } from "./style.css";, by setting styleExport to false. Defaults to true.

defaultExport

You can disable exporting classes as default export, eg import styles from "./style.css";, by setting defaultExport to false. Defaults to true.

variableDeclaration

You can set variable declaration kind, eg var mc_rule = ...;, by setting variableDeclaration to var. Defaults to const.

Shared Options

All other options are passed to the underlying Processor instance, see the Processor Options.

30.0.5

10 months ago

30.0.6

10 months ago

30.2.1

8 months ago

30.1.0

10 months ago

30.2.0

9 months ago

30.1.1

10 months ago

30.0.4

2 years ago

30.0.3

2 years ago

30.0.1

2 years ago

30.0.2

2 years ago

30.0.0

3 years ago

29.1.1

3 years ago

29.1.2

3 years ago

29.1.3

3 years ago

29.1.0

3 years ago

29.0.2

3 years ago

29.0.1

3 years ago

28.2.2

3 years ago

28.1.3

3 years ago

28.1.4

3 years ago

28.2.0

3 years ago

28.2.1

3 years ago

29.0.0

3 years ago

28.1.2

3 years ago

28.1.1

4 years ago

28.0.0

4 years ago

27.1.1

4 years ago

27.1.0

4 years ago