import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import path from 'path'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], clearScreen: false, server: { port: 1420, strictPort: true, watch: { // Editor/agent atomic-write temp folders must never be watched: Windows // reports them as locked and the watcher dies with EBUSY. ignored: ['**/*.tmpdir/**', '**/.tmpdir/**'], }, }, resolve: { alias: { '@': path.resolve(__dirname, './src'), }, }, build: { target: ['es2021', 'chrome105', 'safari13'], minify: !process.env.TAURI_DEBUG ? 'esbuild' : false, sourcemap: !!process.env.TAURI_DEBUG, }, });