-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvite.config.ts
More file actions
27 lines (26 loc) · 931 Bytes
/
Copy pathvite.config.ts
File metadata and controls
27 lines (26 loc) · 931 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
import { defineConfig } from "vite";
import logseqDevPlugin from "vite-plugin-logseq";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [logseqDevPlugin(), react()],
// Makes HMR available for development
build: {
target: "esnext",
minify: "esbuild",
rollupOptions: {
output: {
manualChunks(id) {
if (!id.includes('node_modules')) return undefined
if (id.includes('react') || id.includes('react-dom')) return 'vendor-react'
if (id.includes('date-fns')) return 'vendor-date-fns'
if (id.includes('date-holidays')) return 'vendor-date-holidays'
if (id.includes('lunar-typescript')) return 'vendor-lunar'
if (id.includes('sweetalert2')) return 'vendor-swal'
if (id.includes('logseq-l10n')) return 'vendor-l10n'
return 'vendor'
}
}
}
},
});