-
Notifications
You must be signed in to change notification settings - Fork 16
/
vite.config.ts
38 lines (36 loc) · 1.15 KB
/
vite.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
import { defineConfig } from "vite";
import { crx, defineManifest } from "@crxjs/vite-plugin";
const manifest = defineManifest({
manifest_version: 3,
name: "React Inspector",
description:
"The Inspector launch with Ctrl+Shift+X (Command+Shift+X on Mac). You can detect and open the React component source code easily.",
icons: {
"16": "icon/icon16.png",
"48": "icon/icon48.png",
"128": "icon/icon128.png",
},
action: {
default_title:
"React Inspector: Press Ctrl+Shift+X (Command+Shift+X on Mac)",
},
version: "1.2.2",
content_scripts: [{ js: ["src/content.ts"], matches: ["<all_urls>"] }],
devtools_page: "src/devtools.html",
options_page: "src/options.html",
background: { service_worker: "src/background.ts", type: "module" },
commands: {
inspect: {
suggested_key: { default: "Ctrl+Shift+X", mac: "Command+Shift+X" },
description: 'Inspect the page using the "React Inspector" extension.',
},
},
permissions: ["activeTab", "contextMenus", "storage"],
});
export default defineConfig({
server: { port: 54321 },
plugins: [crx({ manifest })],
optimizeDeps: {
entries: ["src/*.html"],
},
});