forked from chathub-dev/chathub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
36 lines (35 loc) · 855 Bytes
/
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
import { crx } from '@crxjs/vite-plugin'
import react from '@vitejs/plugin-react'
import jotaiDebugLabel from 'jotai/babel/plugin-debug-label'
import jotaiReactRefresh from 'jotai/babel/plugin-react-refresh'
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import manifest from './manifest.config'
export default defineConfig(({ mode }) => {
return {
plugins: [
tsconfigPaths(),
react({
babel: {
plugins: [jotaiDebugLabel, jotaiReactRefresh],
},
}),
crx({ manifest }),
],
build: {
rollupOptions: {
input: ['app.html'],
},
},
esbuild: {
drop: mode === 'production' ? ['console', 'debugger'] : [],
},
server: {
strictPort: true,
port: 5173,
hmr: {
clientPort: 5173,
},
},
}
})