-
Notifications
You must be signed in to change notification settings - Fork 0
/
wxt.config.ts
56 lines (53 loc) · 1.26 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
import { resolve } from 'node:path'
import UnoCSS from 'unocss/vite'
import VueRouter from 'unplugin-vue-router/vite'
import { defineConfig } from 'wxt'
import Layouts from 'vite-plugin-vue-layouts'
import VueDevTools from 'vite-plugin-vue-devtools'
import pkg from './package.json'
export default defineConfig({
modules: ['@wxt-dev/module-vue'],
manifestVersion: 3,
srcDir: resolve('src'),
publicDir: resolve('public'),
manifest: {
name: pkg.displayName || pkg.name,
version: pkg.publishVersion,
version_name: pkg.version,
description: pkg.description,
permissions: [
'storage',
'alarms',
'notifications',
],
host_permissions: ['*://*/*'],
},
imports: {
presets: ['vue'],
addons: {
vueTemplate: true,
},
},
vite(env) {
return {
ssr: {
noExternal: ['@webext-core/messaging', '@webext-core/proxy-service'],
},
define: {
__DEV__: env.mode === 'serve',
__NAME__: JSON.stringify(pkg.name),
},
build: {
sourcemap: env.mode === 'serve',
},
plugins: [
VueRouter({
dts: './src/typed-router.d.ts',
}),
Layouts(),
UnoCSS(),
VueDevTools({ appendTo: /main\.ts/ }),
],
}
},
})