-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathwxt.config.ts
More file actions
30 lines (29 loc) · 814 Bytes
/
wxt.config.ts
File metadata and controls
30 lines (29 loc) · 814 Bytes
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
import { defineConfig } from 'wxt';
import pkg from './package.json';
// See https://wxt.dev/api/config.html
export default defineConfig({
extensionApi: 'chrome',
modules: ['@wxt-dev/module-vue'],
manifest: {
name: 'LinuxDo Scripts',
version: pkg.version,
description: '为 linux.do 用户提供了一些增强功能。',
permissions: ['storage', 'sidePanel', 'tabs'],
host_permissions: ['http://*/*', 'https://*/*'],
side_panel: {
default_path: 'sidepanel.html',
},
},
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'],
});
}
},
},
});