-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathwxt.config.ts
38 lines (37 loc) · 967 Bytes
/
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
import { defineConfig } from 'wxt';
import pkg from './package.json';
// See https://wxt.dev/api/config.html
export default defineConfig({
vite: () => ({
css: {
preprocessorOptions: {
less: {
modifyVars: {
'arcoblue-6': '#2C3E50',
},
},
},
},
}),
extensionApi: 'chrome',
modules: ['@wxt-dev/module-vue'],
manifest: {
name: 'LinuxDo Scripts',
version: pkg.version,
description: '为 linux.do 用户提供了一些增强功能。',
permissions: ['storage'],
host_permissions: ['http://*/*', 'https://*/*'],
},
hooks: {
'build:manifestGenerated': (wxt, manifest) => {
if (wxt.config.command === 'serve') {
manifest.content_scripts ??= [];
manifest.content_scripts.push({
matches: ['https://linux.do/*'],
js: ['content-scripts/content.js'],
css: ['content-scripts/content.css']
});
}
}
}
});