-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
34 lines (27 loc) · 734 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
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { join } from 'node:path'
export default defineConfig({
plugins: [svelte()],
resolve: {
alias: {
$lib: join(__dirname, 'src/lib'),
$ipc: join(__dirname, 'src/lib/ipc.ts'),
$components: join(__dirname, 'src/lib/components'),
$router: join(__dirname, 'src/lib/router')
}
},
clearScreen: false,
publicDir: 'static',
server: {
strictPort: true,
port: 5173
},
envPrefix: ['VITE_', 'TAURI_'],
build: {
outDir: 'build',
target: ['es2021', 'chrome100', 'safari13'],
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_DEBUG
}
})