-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.web.ts
More file actions
45 lines (44 loc) · 928 Bytes
/
vite.config.web.ts
File metadata and controls
45 lines (44 loc) · 928 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
base: '/new-world-chat-ai/',
build: {
outDir: 'docs',
emptyOutDir: false,
rollupOptions: {
input: {
main: path.resolve(__dirname, 'index-web.tsx')
},
external: ['robotjs', 'electron', 'fs', 'path', 'os'],
output: {
globals: {
'robotjs': 'robotjs',
'electron': 'electron',
'fs': 'fs',
'path': 'path',
'os': 'os'
}
}
},
copyPublicDir: false,
},
publicDir: false,
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
define: {
'import.meta.env.VITE_IS_WEB': 'true',
'global': 'globalThis',
},
optimizeDeps: {
exclude: ['robotjs', 'electron']
},
server: {
port: 3000,
open: true
}
})