perf: migrate Tailwind from PostCSS to Vite plugin

Migrate 4 web apps from @tailwindcss/postcss to @tailwindcss/vite:
- chat
- manadeck
- manacore
- presi

Changes per app:
- Replace @tailwindcss/postcss with @tailwindcss/vite in package.json
- Add tailwindcss() to vite.config.ts plugins array
- Delete postcss.config.js (no longer needed)

Benefits:
- Faster builds with native Vite integration
- Consistent build pipeline across all 14 web apps
- Simplified configuration (no separate PostCSS config)
This commit is contained in:
Till-JS 2026-01-29 13:45:42 +01:00
parent 3d15539117
commit 52c4206cb2
13 changed files with 494 additions and 363 deletions

View file

@ -18,8 +18,8 @@
"@sveltejs/adapter-node": "^5.4.0",
"@sveltejs/kit": "^2.43.2",
"@sveltejs/vite-plugin-svelte": "^6.2.0",
"@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "^4.1.7",
"autoprefixer": "^10.4.21",
"postcss": "^8.5.6",
"svelte": "^5.39.5",

View file

@ -1,5 +0,0 @@
export default {
plugins: {
'@tailwindcss/postcss': {},
},
};

View file

@ -1,8 +1,9 @@
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
plugins: [sveltekit(), tailwindcss()],
server: {
port: 5174,
strictPort: true,

View file

@ -20,8 +20,8 @@
"@sveltejs/adapter-node": "^5.0.0",
"@sveltejs/kit": "^2.15.7",
"@sveltejs/vite-plugin-svelte": "^5.0.4",
"@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "^4.1.7",
"@types/node": "^22.10.5",
"@vitest/coverage-v8": "^4.0.14",
"@vitest/ui": "^4.0.14",

View file

@ -1,5 +0,0 @@
export default {
plugins: {
'@tailwindcss/postcss': {},
},
};

View file

@ -1,8 +1,9 @@
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
plugins: [sveltekit(), tailwindcss()],
server: {
port: 5173,
strictPort: true,

View file

@ -16,7 +16,7 @@
"@sveltejs/adapter-auto": "^7.0.0",
"@sveltejs/kit": "^2.47.1",
"@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/vite": "^4.1.7",
"@tailwindcss/typography": "^0.5.19",
"autoprefixer": "^10.4.22",
"postcss": "^8.5.6",

View file

@ -1,5 +0,0 @@
export default {
plugins: {
'@tailwindcss/postcss': {},
},
};

View file

@ -1,8 +1,9 @@
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
plugins: [sveltekit(), tailwindcss()],
server: {
port: 5176,
strictPort: true,

View file

@ -16,9 +16,8 @@
"@sveltejs/adapter-node": "^5.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/vite": "^4.1.7",
"@types/node": "^20.0.0",
"postcss": "^8.4.32",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^5.0.0",

View file

@ -1,5 +0,0 @@
export default {
plugins: {
'@tailwindcss/postcss': {},
},
};

View file

@ -1,9 +1,10 @@
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
import path from 'path';
export default defineConfig({
plugins: [sveltekit()],
plugins: [sveltekit(), tailwindcss()],
server: {
port: 5178,
strictPort: true,

816
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff