aboutsummaryrefslogtreecommitdiff
path: root/vite.config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vite.config.ts')
-rw-r--r--vite.config.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..1e6cfa9
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,23 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+import { fileURLToPath, URL } from 'node:url'
+
+export default defineConfig({
+ plugins: [react()],
+ clearScreen: false,
+ resolve: {
+ alias: {
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
+ },
+ },
+ server: {
+ port: 5173,
+ strictPort: true,
+ },
+ envPrefix: ['VITE_', 'TAURI_'],
+ build: {
+ target: process.env.TAURI_PLATFORM === 'windows' ? 'chrome105' : 'safari13',
+ minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
+ sourcemap: !!process.env.TAURI_DEBUG,
+ },
+})