-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathvite.config.ts
More file actions
33 lines (32 loc) · 988 Bytes
/
Copy pathvite.config.ts
File metadata and controls
33 lines (32 loc) · 988 Bytes
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
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import path from 'path';
export default defineConfig({
plugins: [svelte()],
clearScreen: false,
server: {
port: 1420,
strictPort: true,
watch: {
ignored: ['**/src-tauri/**'],
},
},
envPrefix: ['VITE_', 'TAURI_ENV_'],
build: {
target: process.env.TAURI_ENV_PLATFORM == 'windows'
? 'chrome105'
: process.env.TAURI_ENV_PLATFORM == 'macos'
? 'safari13'
: ['es2021', 'chrome100'],
minify: !process.env.TAURI_ENV_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_ENV_DEBUG,
rollupOptions: {
input: {
pet: path.resolve(__dirname, 'src/windows/pet/index.html'),
hit: path.resolve(__dirname, 'src/windows/hit/index.html'),
bubble: path.resolve(__dirname, 'src/windows/bubble/index.html'),
menu: path.resolve(__dirname, 'src/windows/menu/index.html'),
},
},
},
});