mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-03-23 23:59:24 +08:00
Tailwind CSS v4 requires modern CSS features (@layer, @property, color-mix) that are not supported in older WebView2 versions, causing styles to fail on some Windows 11 systems. Changes: - Replace @tailwindcss/vite with postcss + autoprefixer - Downgrade tailwindcss from 4.1.13 to 3.4.17 - Convert CSS imports from v4 syntax to v3 @tailwind directives - Add darkMode: "selector" to tailwind.config.js - Create postcss.config.js for PostCSS pipeline This improves compatibility with older browsers and WebView2 runtimes while maintaining the same visual appearance.
25 lines
451 B
TypeScript
25 lines
451 B
TypeScript
import path from "node:path";
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
export default defineConfig({
|
|
root: "src",
|
|
plugins: [react()],
|
|
base: "./",
|
|
build: {
|
|
outDir: "../dist",
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
strictPort: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
clearScreen: false,
|
|
envPrefix: ["VITE_", "TAURI_"],
|
|
});
|