-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.browser.ts
59 lines (58 loc) · 1.13 KB
/
vite.config.browser.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import copy from 'rollup-plugin-copy2'
import inject from '@rollup/plugin-inject';
import zip from 'rollup-plugin-zip';
export default defineConfig({
plugins: [
vue(),
copy({
assets: [
[
'public/manifest.json',
'manifest.json'
],
[
'public/wave.png',
'wave.png'
],
[
'public/wave-16.png',
'wave-16.png'
],
[
'public/wave-48.png',
'wave-48.png'
],
[
'public/wave-128.png',
'wave-128.png'
],
[
'public/wave.svg',
'wave.svg'
],
],
}),
zip(),
],
build: {
write: true,
target: 'esnext',
rollupOptions: {
input: {
'main': './index.html',
'background': './background.html',
'popup': './popup.html',
},
output: {
entryFileNames: '[name].js',
},
plugins: [
inject({
browser: ['webextension-polyfill-ts', 'browser'],
}),
]
}
}
})