File size: 1,899 Bytes
0646b18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import path from "path";
import { ConfigEnv, defineConfig } from "wxt";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { normalizePath } from "vite";

// See https://wxt.dev/api/config.html
export default defineConfig({
    srcDir: "src",
    modules: ["@wxt-dev/module-react", "@wxt-dev/webextension-polyfill"],

    manifest: ({ mode }) => {
        return {
            name: "CUGA",
            minimum_chrome_version: "116",
            icons: {
                "16": "icon/16.png",
                "48": "icon/48.png",
                "128": "icon/128.png"
            },
            content_security_policy: {
                extension_pages: "script-src 'self'; object-src 'self';",
            },
            host_permissions: ["*://*/*"],
            permissions: [
                "activeTab",
                "tabs",
                "identity",
                "sidePanel",
                "storage",
                "webNavigation",
                "debugger",
                "webRequest",
                "contextMenus",
                "scripting",
            ],
            action: {},
        };
    },
    vite: (configEnv: ConfigEnv) => {
        return {
            envPrefix: ["NL2UI", "VITE"],
            resolve: {
                alias: {
                    "@uiagent/shared": path.resolve(__dirname, "../shared/dist/index.js"),
                    "@agentic_chat": path.resolve(__dirname, "../agentic_chat/src"),
                },
            },
            plugins: [
                viteStaticCopy({
                    targets: [
                        {
                            src: normalizePath("../node_modules/.pnpm/@[email protected]/node_modules/@ibm/plex/IBM-Plex-Sans"),
                            dest: normalizePath("fonts"),
                        },
                    ],
                }),
            ],
        };
    },
});