@better-css-modules/vite 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -4
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@ pnpm add -D @better-css-modules/vite
|
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
14
|
// vite.config.ts
|
|
15
|
-
import { defineConfig } from
|
|
16
|
-
import betterCssModules from
|
|
15
|
+
import { defineConfig } from "vite";
|
|
16
|
+
import betterCssModules from "@better-css-modules/vite";
|
|
17
17
|
|
|
18
18
|
export default defineConfig({
|
|
19
19
|
plugins: [betterCssModules()],
|
|
@@ -26,11 +26,20 @@ Options can be passed directly to the plugin or configured via `better-css-modul
|
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
28
|
betterCssModules({
|
|
29
|
-
include: [
|
|
30
|
-
|
|
29
|
+
include: ["src/**/*.module.css"],
|
|
30
|
+
exclude: [],
|
|
31
|
+
outDir: "__generated__",
|
|
32
|
+
silent: false,
|
|
31
33
|
});
|
|
32
34
|
```
|
|
33
35
|
|
|
36
|
+
| Option | Type | Default | Description |
|
|
37
|
+
| --------- | ---------- | ------------------------- | -------------------------------------------- |
|
|
38
|
+
| `include` | `string[]` | `["src/**/*.module.css"]` | Glob patterns for target CSS Modules files |
|
|
39
|
+
| `exclude` | `string[]` | `[]` | Glob patterns to exclude |
|
|
40
|
+
| `outDir` | `string` | `"__generated__"` | Output directory for generated `.d.ts` files |
|
|
41
|
+
| `silent` | `boolean` | `false` | Suppress console output |
|
|
42
|
+
|
|
34
43
|
## License
|
|
35
44
|
|
|
36
45
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-css-modules/vite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "k8o",
|
|
6
6
|
"repository": {
|
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
"url": "git+https://github.com/k35o/better-css-modules.git",
|
|
9
9
|
"directory": "packages/vite"
|
|
10
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
11
14
|
"type": "module",
|
|
15
|
+
"main": "./dist/index.cjs",
|
|
16
|
+
"module": "./dist/index.mjs",
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
12
18
|
"exports": {
|
|
13
19
|
".": {
|
|
20
|
+
"types": {
|
|
21
|
+
"import": "./dist/index.d.mts",
|
|
22
|
+
"require": "./dist/index.d.cts"
|
|
23
|
+
},
|
|
14
24
|
"import": "./dist/index.mjs",
|
|
15
25
|
"require": "./dist/index.cjs"
|
|
16
26
|
}
|
|
17
27
|
},
|
|
18
|
-
"main": "./dist/index.cjs",
|
|
19
|
-
"module": "./dist/index.mjs",
|
|
20
|
-
"types": "./dist/index.d.ts",
|
|
21
|
-
"files": [
|
|
22
|
-
"dist"
|
|
23
|
-
],
|
|
24
28
|
"dependencies": {
|
|
25
|
-
"@better-css-modules/unplugin": "0.1.
|
|
29
|
+
"@better-css-modules/unplugin": "0.1.2"
|
|
26
30
|
}
|
|
27
31
|
}
|