Add typescripted css modules

This commit is contained in:
Mona Mayrhofer 2025-12-23 17:00:29 +01:00
parent 06b78c2525
commit 0193c8fcb6
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 374AB152BDEBA1AE
5 changed files with 20 additions and 6 deletions

BIN
bun.lockb

Binary file not shown.

2
packages/web/app/vite-env.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
/// <reference types="vite-plugin-svgr/client" />
/// <reference types="vite/client" />

View file

@ -21,19 +21,20 @@
"vite-plugin-top-level-await": "1.5.0"
},
"devDependencies": {
"@biomejs/biome": "2.3.6",
"@react-router/dev": "7.10.1",
"@tailwindcss/vite": "^4.1.13",
"@types/node": "^22",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"tailwindcss": "^4.1.13",
"typescript": "^5.9.2",
"vite": "^7.1.7",
"vite-tsconfig-paths": "^5.1.4",
"@biomejs/biome": "2.3.6",
"stylelint": "16.26.1",
"stylelint-config-standard": "39.0.1",
"tailwindcss": "^4.1.13",
"typescript": "^5.9.2",
"typescript-plugin-css-modules": "5.2.0",
"vite": "^7.1.7",
"vite-plugin-checker": "0.12.0",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "4.0.16"
}
}

View file

@ -8,10 +8,16 @@
".react-router/types/**/*"
],
"compilerOptions": {
"plugins": [
{
"name": "typescript-plugin-css-modules",
"options": { "classnameTransform": "camelCase" }
}
],
"rootDirs": [".", "./.react-router/types"],
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"]
},
}
}
}

View file

@ -14,6 +14,11 @@ export default defineConfig({
reactRouter(),
tsconfigPaths(),
],
css: {
modules: {
localsConvention: "camelCaseOnly",
},
},
server: {
fs: {
deny: [".devenv/", ".direnv/"],