|
|
@ -50,7 +50,7 @@ const manif = { |
|
|
|
let res; |
|
|
|
|
|
|
|
res = await esbuild.build({ |
|
|
|
entryPoints: ["src/main.js"], |
|
|
|
entryPoints: ["src/main.ts"], |
|
|
|
bundle: true, |
|
|
|
treeShaking: true, |
|
|
|
outdir: "./firefox/dist", |
|
|
@ -64,7 +64,7 @@ const manif = { |
|
|
|
}, |
|
|
|
// inject: ["./esbuild.inject.js"],
|
|
|
|
plugins: [], |
|
|
|
loader: { ".bin": "text", ".wasm": "binary" }, |
|
|
|
loader: { ".bin": "binary", ".wasm": "binary" }, |
|
|
|
metafile: true, |
|
|
|
}); |
|
|
|
|
|
|
@ -102,7 +102,7 @@ const manif = { |
|
|
|
writeFileSync("./firefox/manifest.json", JSON.stringify(manif, null, 2)); |
|
|
|
copyFileSync("./logo.png", "./firefox/1449696017588.png"); |
|
|
|
|
|
|
|
copyFileSync("./src/model.weights.bin", "./firefox/model.weights.bin"); |
|
|
|
copyFileSync("./src/group1-shard1of1.bin", "./firefox/group1-shard1of1.bin"); |
|
|
|
copyFileSync( |
|
|
|
"./src/tfjs-backend-wasm-threaded-simd.wasm", |
|
|
|
"./firefox/tfjs-backend-wasm-threaded-simd.wasm" |
|
|
|