-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.chrome.ts
More file actions
35 lines (31 loc) · 807 Bytes
/
vite.config.chrome.ts
File metadata and controls
35 lines (31 loc) · 807 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
import { resolve } from 'path';
import { crx, ManifestV3Export } from '@crxjs/vite-plugin';
import { mergeConfig, defineConfig } from 'vite';
import baseConfig, { baseManifest, baseBuildOptions } from './vite.config.base';
const outDir = resolve(__dirname, 'dist_chrome');
export default mergeConfig(
baseConfig,
defineConfig({
plugins: [
crx({
manifest: {
...baseManifest,
background: {
service_worker: 'src/pages/background/index.ts',
type: 'module',
},
} as ManifestV3Export,
browser: 'chrome',
}),
],
build: {
...baseBuildOptions,
outDir,
rollupOptions: {
input: {
panel: resolve(__dirname, 'src/pages/panel/index.html'),
},
},
},
})
);