generated from pengx17/logseq-plugin-template-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
42 lines (39 loc) · 1.05 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
import reactPlugin from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import logseqDevPlugin from 'vite-plugin-logseq'
// import globals from "rollup-plugin-node-globals";
import { globalPolyfill } from 'vite-plugin-global-polyfill'
import nodePolyfills from 'rollup-plugin-node-polyfills'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
logseqDevPlugin(),
reactPlugin(),
globalPolyfill(),
// @ ts-expect-error
// nodePolyfills({}),
// { ...globals(), name: 'rollup-plugin-node-globals' },
],
// Makes HMR available for development
build: {
target: 'es2020',
// minify: "esbuild",
},
optimizeDeps: {
esbuildOptions: { target: 'es2020' },
// https://vitejs.dev/config/server-options.html#server-watch
exclude: ['bygonz'],
},
define: {
'process.env': {},
},
// BYGONZ HOT RELOAD - https://vitejs.dev/config/server-options.html#server-watch
server: {
watch: {
ignored: [
// '!**/node_modules/bygonz/**',
'!../ztax/**',
],
},
},
})