Skip to content

Commit 97ca152

Browse files
authored
Add TS plugin for CSS modules to starter (#7616)
* Add typescript-plugin-css-modules typescript plugin for css modules * Configure tsconfig.json for css modules plugin * fix syntax error * Add comment to tsconfig.json
1 parent 83467ca commit 97ca152

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

starters/apps/base/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"globals": "latest",
2727
"prettier": "latest",
2828
"typescript": "latest",
29+
"typescript-plugin-css-modules": "latest",
2930
"undici": "latest",
3031
"vite": "^4.5.2",
3132
"vite-tsconfig-paths": "^4.2.1"

starters/apps/base/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"noEmit": true,
1919
"paths": {
2020
"~/*": ["./src/*"]
21-
}
21+
},
22+
/* if you do not use CSS modules, remove this line and delete the typescript-plugin-css-modules module from package.json */
23+
"plugins": [{ "name": "typescript-plugin-css-modules" }]
2224
},
2325
"include": ["src", "./*.d.ts", "./*.config.ts"]
2426
}

0 commit comments

Comments
 (0)