-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanifest.config.ts
65 lines (64 loc) · 1.54 KB
/
manifest.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
57
58
59
60
61
62
63
64
65
/*
* @Author: mulingyuer
* @Date: 2024-11-11 11:58:04
* @LastEditTime: 2024-11-26 09:15:30
* @LastEditors: mulingyuer
* @Description: manifest 配置文件
* @FilePath: \chrome-extension-template\manifest.config.ts
* 怎么可能会有bug!!!
*/
import { defineManifest } from "@crxjs/vite-plugin";
import packageJson from "./package.json";
export default defineManifest(async (env) => {
return {
manifest_version: 3,
name: env.mode === "production" ? packageJson.name : `[dev] ${packageJson.name}`,
description: packageJson.description,
version: packageJson.version,
minimum_chrome_version: "116",
icons: {
"16": "images/icons/icon-16.png",
"32": "images/icons/icon-32.png",
"48": "images/icons/icon-48.png",
"128": "images/icons/icon-128.png"
},
permissions: [
"sidePanel",
"tabs",
"storage",
"nativeMessaging",
"notifications",
"contextMenus",
"activeTab",
"scripting"
],
content_scripts: [
{
js: ["src/pages/content/main.ts"],
matches: ["https://www.google.com/*"]
}
],
background: {
service_worker: "src/background/background.ts",
type: "module"
},
action: {
default_popup: "src/pages/popup/index.html"
},
side_panel: {
default_path: "src/pages/side-panel/index.html"
},
devtools_page: "src/pages/devtool/index.html",
web_accessible_resources: [
{
resources: [
"src/pages/404/index.html",
"images/notifications-icon/error.png",
"images/notifications-icon/warning.png",
"favicon.ico"
],
matches: ["<all_urls>"]
}
]
};
});