This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathwxt.config.ts
54 lines (52 loc) · 1.45 KB
/
wxt.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
import { defineConfig } from "wxt"
// const pkg_name = import.meta.env.npm_package_name
// const pkg_description = import.meta.env.npm_package_description
// See https://wxt.dev/api/config.html
export default defineConfig({
srcDir: "src",
extensionApi: "chrome",
modules: ["@wxt-dev/module-svelte"],
manifest: ({ browser }) => ({
browser_action: {
theme_icons: [{ light: "icon/light.svg", dark: "icon/dark.svg", size: 16 }],
},
// name: import.meta.env.PROD ? pkg_name : `${pkg_name} BETA`,
// description: import.meta.env.PROD ? pkg_description : "THIS EXTENSION IS FOR BETA TESTING",
permissions: ["activeTab", "storage", "scripting"],
web_accessible_resources: [
{
matches: ["*://*/*"],
resources: ["edropper.js"],
},
],
commands: {
"pick-from-webpage": {
suggested_key: {
default: "Alt+P",
},
description: "Pick color from web page",
},
},
...(browser === "firefox" && {
browser_specific_settings: {
gecko: {
id: "[email protected]",
},
},
}),
}),
runner: {
startUrls: ["https://eyedropper.org"],
openConsole: true,
openDevtools: true,
chromiumArgs: ["--user-data-dir=./.wxt/chrome-data"],
},
vite: () => ({
define: {
__APP_VERSION__: JSON.stringify(`${import.meta.env.npm_package_version}`),
},
ssr: {
noExternal: ["@webext-core/messaging"],
},
}),
})