-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
52 lines (47 loc) · 1.44 KB
/
Copy pathvite.config.ts
File metadata and controls
52 lines (47 loc) · 1.44 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
44
45
46
47
48
49
50
51
52
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;
// https://vite.dev/config/
export default defineConfig(async () => ({
plugins: [react()],
clearScreen: false,
build: {
chunkSizeWarningLimit: 1600,
rollupOptions: {
output: {
manualChunks: {
tiptap: [
'@tiptap/react', '@tiptap/starter-kit', '@tiptap/extension-underline',
'@tiptap/extension-text-align', '@tiptap/extension-text-style',
'@tiptap/extension-color', '@tiptap/extension-highlight',
'@tiptap/extension-font-family', '@tiptap/extension-task-list',
'@tiptap/extension-task-item', '@tiptap/extension-image',
'@tiptap/extension-link', '@tiptap/extension-table',
'@tiptap/extension-table-row', '@tiptap/extension-table-cell',
'@tiptap/extension-table-header', '@tiptap/extension-placeholder',
],
katex: ['katex'],
pptx: ['pptxgenjs'],
vendor: ['react', 'react-dom', 'zustand', 'i18next', 'react-i18next'],
icons: ['lucide-react'],
},
},
},
},
server: {
port: 1420,
strictPort: true,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
ignored: ["**/src-tauri/**"],
},
},
}));