-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
32 lines (31 loc) · 1.01 KB
/
Copy pathvite.config.ts
File metadata and controls
32 lines (31 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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { crx } from '@crxjs/vite-plugin'
import { resolve } from 'path'
import manifest from './manifest.json'
export default defineConfig({
plugins: [
react(),
crx({ manifest }),
],
resolve: {
alias: {
'@shared': resolve(__dirname, 'src/shared'),
'@ui': resolve(__dirname, 'src/ui'),
'@ai': resolve(__dirname, 'src/ai'),
'@heuristics':resolve(__dirname, 'src/heuristics'),
'@storage': resolve(__dirname, 'src/storage'),
'@memory': resolve(__dirname, 'src/memory'),
},
},
build: {
rollupOptions: {
// offscreen document is not a manifest entry — bundle it as an extra input.
// Vite preserves source directory structure for HTML entries, so this always
// outputs to dist/src/offscreen/index.html, matching OFFSCREEN_URL in constants.ts.
input: {
offscreen: resolve(__dirname, 'src/offscreen/index.html'),
},
},
},
})