mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-30 06:23:46 +03:00
786f188923
- Changes the IP prompt to also show IPV6 address ending with ::2 (usually device's address) - Adds --host option on ios dev to force the host - Also makes it work with our own dev server impl (builtin)
25 lines
623 B
JavaScript
25 lines
623 B
JavaScript
import { defineConfig } from "vite";
|
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
|
|
const host = process.env.TAURI_DEV_HOST;
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [svelte()],
|
|
|
|
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
|
// prevent vite from obscuring rust errors
|
|
clearScreen: false,
|
|
// tauri expects a fixed port, fail if that port is not available
|
|
server: {
|
|
host: host || false,
|
|
port: 1420,
|
|
strictPort: true,
|
|
hmr: host ? {
|
|
protocol: 'ws',
|
|
host,
|
|
port: 1421
|
|
} : undefined,
|
|
},
|
|
})
|