forked from chathub-dev/chathub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts.timestamp-1691531563925-45434fc74f1ec.mjs
96 lines (94 loc) · 8.41 KB
/
vite.config.ts.timestamp-1691531563925-45434fc74f1ec.mjs
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// vite.config.ts
import { defineConfig } from "file:///Users/mingz/Documents/chathub/node_modules/vite/dist/node/index.js";
import react from "file:///Users/mingz/Documents/chathub/node_modules/@vitejs/plugin-react/dist/index.mjs";
import { crx } from "file:///Users/mingz/Documents/chathub/node_modules/@crxjs/vite-plugin/dist/index.mjs";
import tsconfigPaths from "file:///Users/mingz/Documents/chathub/node_modules/vite-tsconfig-paths/dist/index.mjs";
// manifest.config.ts
import { defineManifest } from "file:///Users/mingz/Documents/chathub/node_modules/@crxjs/vite-plugin/dist/index.mjs";
var manifest_config_default = defineManifest(async (env) => {
return {
manifest_version: 3,
name: "__MSG_appName__",
description: "__MSG_appDesc__",
default_locale: "en",
version: "1.34.0",
icons: {
"16": "src/assets/icon.png",
"32": "src/assets/icon.png",
"48": "src/assets/icon.png",
"128": "src/assets/icon.png"
},
background: {
service_worker: "src/background/index.ts",
type: "module"
},
action: {},
host_permissions: [
"https://*.bing.com/",
"https://*.openai.com/",
"https://bard.google.com/",
"https://*.chathub.gg/"
],
optional_host_permissions: ["https://*/*"],
permissions: ["storage", "unlimitedStorage", "sidePanel", "declarativeNetRequestWithHostAccess"],
content_scripts: [
{
matches: ["https://chat.openai.com/*"],
js: ["src/content-script/chatgpt-inpage-proxy.ts"]
}
],
commands: {
"open-app": {
suggested_key: {
default: "Alt+J",
windows: "Alt+J",
linux: "Alt+J",
mac: "Command+J"
},
description: "Open ChatHub app"
}
},
side_panel: {
default_path: "sidepanel.html"
},
declarative_net_request: {
rule_resources: [
{
id: "ruleset_bing",
enabled: true,
path: "src/rules/bing.json"
},
{
id: "ruleset_ddg",
enabled: true,
path: "src/rules/ddg.json"
}
]
}
};
});
// vite.config.ts
var vite_config_default = defineConfig(({ command, mode }) => {
return {
plugins: [tsconfigPaths(), react(), crx({ manifest: manifest_config_default })],
build: {
rollupOptions: {
input: ["app.html"]
}
},
esbuild: {
drop: mode === "production" ? ["console", "debugger"] : []
},
server: {
strictPort: true,
port: 5173,
hmr: {
clientPort: 5173
}
}
};
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiLCAibWFuaWZlc3QuY29uZmlnLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiL1VzZXJzL21pbmd6L0RvY3VtZW50cy9jaGF0aHViXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCIvVXNlcnMvbWluZ3ovRG9jdW1lbnRzL2NoYXRodWIvdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL1VzZXJzL21pbmd6L0RvY3VtZW50cy9jaGF0aHViL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAndml0ZSdcbmltcG9ydCByZWFjdCBmcm9tICdAdml0ZWpzL3BsdWdpbi1yZWFjdCdcbmltcG9ydCB7IGNyeCB9IGZyb20gJ0Bjcnhqcy92aXRlLXBsdWdpbidcbmltcG9ydCB0c2NvbmZpZ1BhdGhzIGZyb20gJ3ZpdGUt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