-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwxt.config.ts
More file actions
51 lines (50 loc) · 1.67 KB
/
Copy pathwxt.config.ts
File metadata and controls
51 lines (50 loc) · 1.67 KB
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
import { defineConfig } from 'wxt';
import tailwindcss from '@tailwindcss/vite';
// WXT manifest 声明 —— 权限最小化(见设计文档 §8)
export default defineConfig({
modules: ['@wxt-dev/module-react'],
srcDir: '.',
// 不自动拉起独立 Chrome;由你把 .output/chrome-mv3-dev 手动加载进自己的浏览器
webExt: {
disabled: true,
},
vite: () => ({
plugins: [tailwindcss()],
}),
manifest: {
// 名称/描述/命令描述经 _locales 本地化(default_locale=en);见 public/_locales/*
default_locale: 'en',
name: '__MSG_appName__',
description: '__MSG_appDesc__',
permissions: ['tabs', 'tabGroups', 'storage', 'sidePanel', 'alarms'],
// 官方两档 + 自定义中转站(任意 https host,运行时按所填地址派生 origin、带用户手势申请)
optional_host_permissions: [
'https://api.anthropic.com/*',
'https://api.openai.com/*',
'https://*/*',
],
// 工具栏图标(点击打开侧边栏);图标沿用 public/icon 下的 logo
action: {
default_icon: {
'16': 'icon/16.png',
'32': 'icon/32.png',
'48': 'icon/48.png',
'128': 'icon/128.png',
},
},
commands: {
'open-panel': {
suggested_key: { default: 'Ctrl+Shift+O', mac: 'Command+Shift+O' },
description: '__MSG_cmdOpenPanel__',
},
'open-search': {
suggested_key: { default: 'Ctrl+Shift+K', mac: 'Command+Shift+K' },
description: '__MSG_cmdOpenSearch__',
},
'merge-duplicates': {
suggested_key: { default: 'Ctrl+Shift+D', mac: 'Command+Shift+D' },
description: '__MSG_cmdMergeDuplicates__',
},
},
},
});