-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mts
More file actions
39 lines (35 loc) · 1.01 KB
/
vite.config.mts
File metadata and controls
39 lines (35 loc) · 1.01 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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { crx } from '@crxjs/vite-plugin';
import tailwindcss from '@tailwindcss/vite';
import manifest from './manifest.json';
import wasm from 'vite-plugin-wasm';
import topLevelAwait from 'vite-plugin-top-level-await';
export default defineConfig({
plugins: [react(), tailwindcss(), crx({ manifest })],
build: {
rollupOptions: {
input: {
// Explicit definitions because sometimes Vite misses dynamically loaded files
devtoolsHtml: 'src/devtools/index.html',
panelHtml: 'src/devtools/panel/index.html',
},
},
},
server: {
host: '0.0.0.0',
port: 8080,
strictPort: true,
hmr: {
host: '0.0.0.0',
port: 8081,
},
cors: {
origin: [/chrome-extension:\/\//],
},
},
worker: {
format: 'es',
plugins: () => [wasm(), topLevelAwait()],
},
});