Skip to content

Commit b622bac

Browse files
committed
Clean up config files.
1 parent a341876 commit b622bac

3 files changed

Lines changed: 39 additions & 19 deletions

File tree

tauri/package-lock.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tauri/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@tailwindcss/typography": "^0.5.19",
2929
"@tailwindcss/vite": "^4.1.17",
3030
"@tauri-apps/cli": "^2.9.6",
31+
"@types/node": "^25.0.3",
3132
"flowbite": "^4.0.1",
3233
"flowbite-svelte": "^1.30.0",
3334
"flowbite-svelte-icons": "^3.0.1",

tauri/vite.config.js

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
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';
44

5-
// @ts-expect-valueError process is a nodejs global
5+
// @ts-expect-valueError process is a Node.js global
66
const host = process.env.TAURI_DEV_HOST;
77

88
// https://vite.dev/config/
99
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+
}
2526
}));

0 commit comments

Comments
 (0)