Add cross-browser popup status handling
This commit is contained in:
parent
9c65a61ebb
commit
7e17470356
38 changed files with 1242 additions and 199 deletions
|
|
@ -39,6 +39,7 @@ function inputsFor(mode: string): Record<string, string> {
|
|||
background: mode === "firefox" ? "src/background/firefox.ts" : "src/background/chromium.ts",
|
||||
inference: "src/inference/worker.ts",
|
||||
options: "src/options/main.ts",
|
||||
popup: "src/popup/main.ts",
|
||||
offscreen: "src/background/offscreen.ts"
|
||||
};
|
||||
}
|
||||
|
|
@ -49,6 +50,7 @@ function manifestPlugin(mode: string): Plugin {
|
|||
generateBundle() {
|
||||
const filename = mode === "firefox" ? "public/manifest.firefox.json" : "public/manifest.chromium.json";
|
||||
this.emitFile({ type: "asset", fileName: "manifest.json", source: readFileSync(filename, "utf8") });
|
||||
this.emitFile({ type: "asset", fileName: "ort/ort-wasm-simd-threaded.jsep.wasm", source: readFileSync("node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.jsep.wasm") });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue