-
Notifications
You must be signed in to change notification settings - Fork 28
/
vite.config.ts
43 lines (42 loc) · 1.04 KB
/
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
35
36
37
38
39
40
41
42
43
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import * as path from "path";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
plugins: [
// visualizer({
// gzipSize: true,
// template: 'treemap',
// filename: 'stats/rollup-stats.html',
// }),
react({
// jsxImportSource: '@welldone-software/why-did-you-render'
}),
VitePWA({
workbox: {
skipWaiting: true
},
injectRegister: null,
devOptions: {
enabled: false
},
}),
],
clearScreen: false,
server: {
port: 1420,
strictPort: true,
},
envPrefix: ["VITE_", "TAURI_", "CURSES_"],
resolve: {
alias: [{ find: "@", replacement: path.resolve(__dirname, "src") }],
},
build: {
// Tauri supports es2021
target: ["es2021", "chrome100", "safari13"],
// don't minify for debug builds
minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_DEBUG,
},
});