-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmanifest.ts
53 lines (50 loc) · 1.3 KB
/
manifest.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
import packageJson from "./package.json";
const manifest: chrome.runtime.ManifestV3 = {
manifest_version: 3,
name: "__MSG_extName__",
version: packageJson.version,
description: "__MSG_extDesc__",
default_locale: "en",
options_page: "src/pages/options/index.html",
background: {
service_worker: "src/pages/background/index.js",
type: "module",
},
action: {
default_popup: "src/pages/popup/index.html",
default_icon: "icon16.png",
},
icons: {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png",
},
content_scripts: [
{
matches: ["http://*/*", "https://*/*", "<all_urls>"],
js: ["src/pages/content/index.js"],
run_at: "document_start",
css: ["assets/css/contentStyle.chunk.css"],
},
],
permissions: ["tabs", "contextMenus", "notifications"],
optional_permissions: ["background", "clipboardWrite"],
web_accessible_resources: [
{
resources: [
"assets/js/*.js",
"assets/css/*.css",
"img/*.png",
"icon16.png",
"icon48.png",
"src/pages/helper/index.html",
],
matches: ["*://*/*"],
},
],
};
const isDev = process.env.__DEV__ === "true";
if (isDev) {
manifest.web_accessible_resources[0].resources.push("assets/js/*.js.map");
}
export default manifest;