-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.config.ts
39 lines (37 loc) · 1.09 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
import { defineManifest } from "@crxjs/vite-plugin";
import packageJson from "./package.json";
const { version } = packageJson;
// Convert from Semver (example: 0.1.0-beta6)
const [major, minor, patch, label = "0"] = version.replace(/[^\d.-]+/g, "").split(/[.-]/);
export default defineManifest(async (env) => {
return {
name: "__MSG_appName__" + (env.mode === "development" ? " [DEV] " : ""),
description: "__MSG_appDesc__",
default_locale: "en",
short_name: "dafilms-ext",
author: "bartholomej",
icons: {
16: "src/assets/logo-16.png",
32: "src/assets/logo-32.png",
128: "src/assets/logo-128.png"
},
version: `${major}.${minor}.${patch}.${label}`,
version_name: version,
host_permissions: ["https://www.csfd.cz/"],
content_scripts: [
{
run_at: "document_end",
matches: [
"https://*.dafilms.cz/*",
"https://*.dafilms.com/*"
],
js: ["src/content.tsx"]
}
],
background: {
service_worker: "src/background.ts",
type: "module"
},
manifest_version: 3,
};
});