-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
34 lines (32 loc) · 877 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/// <reference types="vitest" />
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
// https://tauri.app/v1/guides/getting-started/setup/vite#create-the-frontend
export default defineConfig({
base: "./",
root: "./src",
// prevent vite from obscuring rust errors
clearScreen: false,
server: {
host: "0.0.0.0",
port: 3000,
open: true,
// Tauri expects a fixed port, fail if that port is not available
strictPort: true,
},
build: {
outDir: "../dist",
emptyOutDir: true,
// don't minify for debug builds
minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_DEBUG,
},
plugins: [react()],
test: {
globals: true,
environment: "jsdom",
setupFiles: "./vitest.setup.ts",
},
});