i think i got step one working

This commit is contained in:
2026-03-25 01:22:30 -06:00
parent 4230ae6cb9
commit b4bcb8f3f2
14 changed files with 5932 additions and 32 deletions

View File

@ -1,15 +1,30 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// Use TAURI_DEV_HOST when running inside tauri dev, otherwise fall back to localhost.
const host = process.env.TAURI_DEV_HOST;
export default defineConfig({
plugins: [react()],
base: './',
// Prevent vite from obscuring Rust errors in tauri dev
clearScreen: false,
server: {
port: 5173,
strictPort: true,
host: host || false,
hmr: host ? { protocol: 'ws', host, port: 5174 } : undefined,
watch: {
// Tauri expects a hot reloading mechanism; ignore Rust src changes in Vite
ignored: ['**/src-tauri/**'],
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
// Produces smaller bundle sizes compatible with Tauri's webview
target: ['es2021', 'chrome105', 'safari13'],
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_DEBUG,
},
});