From cfe078eec815c72e0958ff53e44899ee2e9ea1d7 Mon Sep 17 00:00:00 2001 From: Vytenis Date: Tue, 20 May 2025 02:02:45 +0300 Subject: [PATCH 1/4] Add typescript-plugin-css-modules typescript plugin for css modules --- starters/apps/base/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/starters/apps/base/package.json b/starters/apps/base/package.json index c464aadc3f0..457f0663cf0 100644 --- a/starters/apps/base/package.json +++ b/starters/apps/base/package.json @@ -25,6 +25,7 @@ "eslint-plugin-qwik": "latest", "prettier": "latest", "typescript": "latest", + "typescript-plugin-css-modules": "latest", "undici": "latest", "vite": "^4.5.2", "vite-tsconfig-paths": "^4.2.1" From ea6d675732660becf5f59126a228f39409cb0986 Mon Sep 17 00:00:00 2001 From: Vytenis Date: Tue, 20 May 2025 02:03:55 +0300 Subject: [PATCH 2/4] Configure tsconfig.json for css modules plugin --- starters/apps/base/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/starters/apps/base/tsconfig.json b/starters/apps/base/tsconfig.json index 2a2bc9fcce5..5f2cbd3499f 100644 --- a/starters/apps/base/tsconfig.json +++ b/starters/apps/base/tsconfig.json @@ -18,7 +18,8 @@ "noEmit": true, "paths": { "~/*": ["./src/*"] - } + }, + "plugins": [{ "name": "typescript-plugin-css-modules" }], }, "include": ["src", "./*.d.ts", "./*.config.ts"] } From c00d56ea9649b1051db20b4326fa9879f679a247 Mon Sep 17 00:00:00 2001 From: Vytenis Date: Tue, 20 May 2025 02:22:27 +0300 Subject: [PATCH 3/4] fix syntax error --- starters/apps/base/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starters/apps/base/tsconfig.json b/starters/apps/base/tsconfig.json index 5f2cbd3499f..aa1f8558b4c 100644 --- a/starters/apps/base/tsconfig.json +++ b/starters/apps/base/tsconfig.json @@ -19,7 +19,7 @@ "paths": { "~/*": ["./src/*"] }, - "plugins": [{ "name": "typescript-plugin-css-modules" }], + "plugins": [{ "name": "typescript-plugin-css-modules" }] }, "include": ["src", "./*.d.ts", "./*.config.ts"] } From 531f3518d2a7eb5422e9a5bab15276f600332ef3 Mon Sep 17 00:00:00 2001 From: Vytenis Date: Mon, 26 May 2025 22:29:59 +0300 Subject: [PATCH 4/4] Add comment to tsconfig.json --- starters/apps/base/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/starters/apps/base/tsconfig.json b/starters/apps/base/tsconfig.json index aa1f8558b4c..bc92b469fbd 100644 --- a/starters/apps/base/tsconfig.json +++ b/starters/apps/base/tsconfig.json @@ -19,6 +19,7 @@ "paths": { "~/*": ["./src/*"] }, + /* if you do not use CSS modules, remove this line and delete the typescript-plugin-css-modules module from package.json */ "plugins": [{ "name": "typescript-plugin-css-modules" }] }, "include": ["src", "./*.d.ts", "./*.config.ts"]