Skip to content

Commit 4c247d9

Browse files
committed
chore: Upgrade Tailwind to v4 and switch to Vite
Use the new @tailwindcss/vite plugin instead of the deprecated @astrojs/tailwind plugin
1 parent 9800f97 commit 4c247d9

File tree

5 files changed

+406
-507
lines changed

5 files changed

+406
-507
lines changed

astro.config.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { defineConfig } from "astro/config";
22
import mdx from "@astrojs/mdx";
33
import sitemap from "@astrojs/sitemap";
4-
import tailwind from "@astrojs/tailwind";
4+
import tailwindcss from "@tailwindcss/vite";
55

66
export default defineConfig({
77
site: "https://astro-nano-demo.vercel.app",
8-
integrations: [mdx(), sitemap(), tailwind()],
8+
integrations: [mdx(), sitemap()],
9+
vite: {
10+
plugins: [tailwindcss()],
11+
},
912
});

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"@astrojs/mdx": "^4.3.3",
1818
"@astrojs/rss": "4.0.12",
1919
"@astrojs/sitemap": "^3.4.2",
20-
"@astrojs/tailwind": "^6.0.2",
2120
"@fontsource/inter": "^5.0.17",
2221
"@fontsource/lora": "^5.0.16",
23-
"@tailwindcss/typography": "^0.5.10",
22+
"@tailwindcss/typography": "0.5.0-alpha.3",
23+
"@tailwindcss/vite": "^4.1.11",
2424
"@typescript-eslint/eslint-plugin": "^7.3.1",
2525
"@typescript-eslint/parser": "^7.3.1",
2626
"astro": "^5.12.8",
@@ -30,7 +30,7 @@
3030
"eslint-plugin-jsx-a11y": "^6.8.0",
3131
"sharp": "^0.33.3",
3232
"tailwind-merge": "^2.2.2",
33-
"tailwindcss": "^3.4.1",
33+
"tailwindcss": "^4.1.11",
3434
"typescript": "^5.4.2"
3535
}
3636
}

0 commit comments

Comments
 (0)