Skip to content

Commit 808be82

Browse files
committed
refactor: switch to Tailwind v4 Vite plugin
- Replace @tailwindcss/postcss with @tailwindcss/vite - Remove postcss.config.js - Update vite.config.ts with tailwindcss plugin - Remove @config directive from App.css (Vite plugin reads config automatically)
1 parent ba975a6 commit 808be82

File tree

5 files changed

+16
-28
lines changed

5 files changed

+16
-28
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@graphql-codegen/schema-ast": "5.0.0",
5959
"@octokit/openapi-types": "27.0.0",
6060
"@parcel/watcher": "2.5.1",
61-
"@tailwindcss/postcss": "4.1.18",
61+
"@tailwindcss/vite": "^4.1.18",
6262
"@tauri-apps/cli": "^2",
6363
"@testing-library/jest-dom": "^6.9.1",
6464
"@testing-library/react": "16.3.1",

pnpm-lock.yaml

Lines changed: 13 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

postcss.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/App.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
/** GitHub Primer Design System */
55
@import "@primer/css/dist/primer.css";
66

7-
/** Tailwind CSS Configuration */
8-
@config "../tailwind.config.ts";
9-
107
html,
118
body,
129
#root {

vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import tailwindcss from '@tailwindcss/vite';
12
import react from '@vitejs/plugin-react';
23
import { defineConfig } from 'vite';
34

@@ -6,7 +7,7 @@ const host = process.env.TAURI_DEV_HOST;
67

78
// https://vite.dev/config/
89
export default defineConfig(async () => ({
9-
plugins: [react()],
10+
plugins: [react(), tailwindcss()],
1011

1112
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
1213
//

0 commit comments

Comments
 (0)