converted to tauri desktop app

This commit is contained in:
2026-01-29 18:28:35 +02:00
parent cc51c5a236
commit a3b566528a
51 changed files with 7556 additions and 58 deletions

View File

@@ -1,20 +1,41 @@
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
server: {
port: 3000,
host: '0.0.0.0',
},
plugins: [react()],
define: {},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
}
}
};
export default defineConfig({
plugins: [react()],
// Vite options tailored for Tauri development
clearScreen: false,
server: {
port: 3000,
strictPort: true,
host: '0.0.0.0',
// Tauri requires a consistent port for the dev server
watch: {
ignored: ['**/src-tauri/**'],
},
},
// to make use of `TAURI_DEBUG` and other env variables
envPrefix: ['VITE_', 'TAURI_'],
build: {
// Tauri supports es2021
target: process.env.TAURI_PLATFORM == 'windows' ? 'chrome105' : 'safari13',
// don't minify for debug builds
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_DEBUG,
// Output to dist folder for Tauri
outDir: 'dist',
emptyOutDir: true,
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});