-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwxt.config.ts
More file actions
47 lines (42 loc) · 1.29 KB
/
Copy pathwxt.config.ts
File metadata and controls
47 lines (42 loc) · 1.29 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
import {defineConfig} from 'wxt';
import vue from '@vitejs/plugin-vue';
import {resolve} from 'path';
import fs from 'fs';
const packageJson = JSON.parse(fs.readFileSync(resolve(__dirname, 'package.json'), 'utf-8'));
// See https://wxt.dev/api/config.html
export default defineConfig({
modules: ['@wxt-dev/webextension-polyfill'],
imports: {
addons: {
vueTemplate: true,
},
},
vite: () => ({
plugins: [vue()],
define: {
'process.env.VUE_APP_VERSION': JSON.stringify(packageJson.version),
}
}),
manifest: {
name: 'Selah Translate',
action: { default_title: 'Selah Translate' },
permissions: ['storage', 'contextMenus'],
host_permissions: [
'*://*.openai.com/*',
'*://api.openai.com/*',
'*://*.googleapis.com/*',
'*://translate.googleapis.com/*',
'*://api-edge.cognitive.microsofttranslator.com/*',
'*://edge.microsoft.com/*',
'*://*.anthropic.com/*',
'*://*.deepseek.com/*',
'*://api.moonshot.cn/*',
],
web_accessible_resources: [
{
resources: ['icon/logo.png'],
matches: ['<all_urls>'],
},
],
},
});