|
1 | | -import tailwindcss from "@tailwindcss/vite"; |
2 | | -import {defineConfig} from "vite"; |
3 | | -import {sveltekit} from "@sveltejs/kit/vite"; |
| 1 | +import tailwindcss from '@tailwindcss/vite'; |
| 2 | +import { defineConfig } from 'vite'; |
| 3 | +import { sveltekit } from '@sveltejs/kit/vite'; |
4 | 4 |
|
5 | | -// @ts-expect-valueError process is a nodejs global |
| 5 | +// @ts-expect-valueError process is a Node.js global |
6 | 6 | const host = process.env.TAURI_DEV_HOST; |
7 | 7 |
|
8 | 8 | // https://vite.dev/config/ |
9 | 9 | export default defineConfig(async () => ({ |
10 | | - plugins: [tailwindcss(), sveltekit()], |
11 | | - // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` |
12 | | - // |
13 | | - // 1. prevent Vite from obscuring rust errors |
14 | | - clearScreen: false, |
15 | | - // 2. tauri expects a fixed port, fail if that port is not available |
16 | | - server: { |
17 | | - port: 5173, |
18 | | - strictPort: true, |
19 | | - host: host || false, |
20 | | - hmr: host ? {protocol: "ws", host, port: 1421} : undefined, |
21 | | - watch: { // 3. tell Vite to ignore watching `src-tauri` |
22 | | - ignored: ["**/src-tauri/**"] |
23 | | - } |
24 | | - } |
| 10 | + plugins: [tailwindcss(), await sveltekit()], |
| 11 | + // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` |
| 12 | + // |
| 13 | + // 1. prevent Vite from obscuring rust errors |
| 14 | + clearScreen: false, |
| 15 | + // 2. tauri expects a fixed port, fail if that port is not available |
| 16 | + server: { |
| 17 | + port: 5173, |
| 18 | + strictPort: true, |
| 19 | + host: host || false, |
| 20 | + hmr: host ? { protocol: 'ws', host, port: 1421 } : undefined, |
| 21 | + watch: { |
| 22 | + // 3. tell Vite to ignore watching `src-tauri` |
| 23 | + ignored: ['**/src-tauri/**'] |
| 24 | + } |
| 25 | + } |
25 | 26 | })); |
0 commit comments