-
Notifications
You must be signed in to change notification settings - Fork 2
/
wxt.config.ts
54 lines (53 loc) · 1.33 KB
/
wxt.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { defineConfig } from 'wxt'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
// See https://wxt.dev/api/config.html
export default defineConfig({
manifest: ({ mode }) => ({
name: mode === 'development' ? '新百词斩助手-dev' : '新百词斩助手',
permissions: ['storage'],
host_permissions: [
'http://110.42.229.221/*',
'https://resource.baicizhan.com/*',
'https://words-100-api.honwhy.wang/*',
],
web_accessible_resources: [
{
resources: ['*.png', '*.svg', '*.txt', 'options.html'],
matches: ['<all_urls>'],
},
],
}),
imports: {
addons: {
vueTemplate: true,
},
},
vite: () => ({
plugins: [
vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
],
build: {
// Enabling sourcemaps with Vue during development is known to cause problems with Vue
sourcemap: false,
},
css: {
preprocessorOptions: {
scss: {
additionalData: `@import '@/global.scss';`,
},
},
},
}),
zip: {
excludeSources: ['env.txt'],
},
})