-
Notifications
You must be signed in to change notification settings - Fork 0
/
wxt.config.ts
94 lines (90 loc) · 2.14 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { resolve } from 'node:path'
import process from 'node:process'
import { PrimeVueResolver } from '@primevue/auto-import-resolver'
import vue from '@vitejs/plugin-vue'
import { config } from 'dotenv'
import UnoCSS from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite'
import Icons from 'unplugin-icons/vite'
import TurboConsole from 'unplugin-turbo-console/vite'
import Components from 'unplugin-vue-components/vite'
import { defineConfig } from 'wxt'
config()
// See https://wxt.dev/api/config.html
export default defineConfig({
srcDir: 'src',
imports: {
addons: {
vueTemplate: true,
},
eslintrc: {
enabled: true,
},
},
extensionApi: 'chrome',
// modules: ['@wxt-dev/module-vue'],
manifest: {
key: process.env.VITE_CRX_PUBLIC_KEY,
name: 'Shop Copilot Recorder',
web_accessible_resources: [
{
matches: ['<all_urls>'],
resources: [
'rule-builder.html',
],
},
],
permissions: [
'storage',
'tabs',
'sidePanel',
'webRequest',
'webNavigation',
'declarativeNetRequest',
],
},
vite: () => ({
define: {
__DEV__: true,
__FEATURES__: JSON.stringify({
COOKIE_MANAGEMENT: true,
PROXY_REQUESTS: false,
BLOCK_DEVTOOLS: false,
}),
},
plugins: [
vue(),
TurboConsole({
disableLaunchEditor: true,
}),
AutoImport({
imports: [
'vue',
],
dts: resolve('src/types/auto-imports.d.ts'),
}),
// https://github.com/antfu/unplugin-vue-components
Components({
dirs: [resolve('src/components/')],
dts: resolve('src/types/components.d.ts'),
resolvers: [
PrimeVueResolver(),
// auto import icons
],
}),
// https://github.com/antfu/unplugin-icons
Icons(),
UnoCSS(),
],
build: {
// Enabling sourcemaps with Vue during development is known to cause problems with Vue
sourcemap: false,
},
ssr: {
noExternal: [
'@webext-core/messaging',
'@webext-core/storage',
],
},
}),
})