-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
43 lines (41 loc) · 1.28 KB
/
Copy pathvite.config.ts
File metadata and controls
43 lines (41 loc) · 1.28 KB
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 { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// The Tauri dev server must be reachable at a fixed address, because the Rust
// side is configured with that exact URL and cannot follow a port change.
const DEV_PORT = 1420
export default defineConfig({
plugins: [react(), tailwindcss()],
clearScreen: false,
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
port: DEV_PORT,
strictPort: true,
watch: {
ignored: [
// Rust sources have their own rebuild loop.
'**/src-tauri/**',
// Editing prose reloaded the running app, which is worse than useless
// mid-install: it throws away the console you were reading.
'**/docs/**',
// The download page is its own static site, deployed by its own
// workflow. It shares nothing with this bundle but a palette.
'**/website/**',
'**/.workflow/**',
'**/*.md',
],
},
},
// Both WebView2 and WKWebView are evergreen enough that transpiling further
// down only costs bundle size.
build: {
target: 'es2022',
sourcemap: false,
chunkSizeWarningLimit: 900,
},
})