diff options
| author | 2026-02-25 01:32:51 +0800 | |
|---|---|---|
| committer | 2026-02-25 01:32:51 +0800 | |
| commit | 66668d85d603c5841d755a6023aa1925559fc6d4 (patch) | |
| tree | 485464148c76b0021efb55b7d2afd1c3004ceee0 /packages/ui/vite.config.ts | |
| parent | a6773bd092db654360c599ca6b0108ea0e456e8c (diff) | |
| download | DropOut-66668d85d603c5841d755a6023aa1925559fc6d4.tar.gz DropOut-66668d85d603c5841d755a6023aa1925559fc6d4.zip | |
chore(workspace): replace legacy codes
Diffstat (limited to 'packages/ui/vite.config.ts')
| -rw-r--r-- | packages/ui/vite.config.ts | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts index 32610e2..27ce1ff 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -1,26 +1,18 @@ -import { defineConfig } from "vite"; -import { svelte } from "@sveltejs/vite-plugin-svelte"; import tailwindcss from "@tailwindcss/vite"; +import react from "@vitejs/plugin-react"; +import path from "path"; +import { defineConfig } from "vite"; // https://vite.dev/config/ export default defineConfig({ - plugins: [tailwindcss(), svelte()], - - // Fix for Tauri + Vite HMR - server: { - host: true, - strictPort: true, - hmr: { - protocol: "ws", - host: "localhost", - port: 5173, - }, - watch: { - usePolling: true, + plugins: [react(), tailwindcss()], + resolve: { + alias: { + "@": path.resolve(__dirname, "./src"), + "@components": path.resolve(__dirname, "./src/components"), + "@stores": path.resolve(__dirname, "./src/stores"), + "@types": path.resolve(__dirname, "./src/types"), + "@pages": path.resolve(__dirname, "./src/pages"), }, }, - - // Ensure compatibility with Tauri - clearScreen: false, - envPrefix: ["VITE_", "TAURI_"], }); |