diff --git a/build-chrome.js b/build-chrome.js index 386359d..0fa34d7 100644 --- a/build-chrome.js +++ b/build-chrome.js @@ -45,7 +45,7 @@ const manif3 = { const lmanif = manif3; res = await esbuild.build({ - entryPoints: ["src/main.js"], + entryPoints: ["src/main.ts"], bundle: true, treeShaking: true, outdir: "./chrome/dist", @@ -59,7 +59,7 @@ const manif3 = { }, // inject: ["./esbuild.inject.js"], plugins: [], - loader: { ".bin": "text", ".wasm": "binary" }, // Hacky solution for loading model.weights.bin but it works for now. + loader: { ".bin": "binary", ".wasm": "binary" }, // Hacky solution for loading model.weights.bin but it works for now. metafile: true, }); @@ -97,7 +97,7 @@ const manif3 = { writeFileSync("./chrome/manifest.json", JSON.stringify(lmanif, null, 2)); copyFileSync("./logo.png", "./chrome/1449696017588.png"); - copyFileSync("./src/model.weights.bin", "./chrome/model.weights.bin"); + copyFileSync("./src/group1-shard1of1.bin", "./chrome/group1-shard1of1.bin"); copyFileSync( "./src/tfjs-backend-wasm-threaded-simd.wasm", "./chrome/tfjs-backend-wasm-threaded-simd.wasm" diff --git a/build-ff.js b/build-ff.js index 659604d..83d719c 100644 --- a/build-ff.js +++ b/build-ff.js @@ -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"