Skip to content

Commit 6096b01

Browse files
committed
Update post-build script
1 parent 37976d2 commit 6096b01

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

webpack.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ class PostBuildPlugin {
4141
apply(compiler) {
4242
compiler.hooks.done.tap('PostBuildPlugin', () => {
4343
const dist = path.join(__dirname, 'dist');
44-
const ORT_JSEP_FILE = 'ort-wasm-simd-threaded.jsep.mjs';
45-
const ORT_BUNDLE_FILE = 'ort.bundle.min.mjs';
44+
const ORT_JSEP_FILE = 'ort-wasm-simd-threaded.asyncify.mjs';
45+
const ORT_BUNDLE_FILE = 'ort.webgpu.bundle.min.mjs';
4646

47-
// 1. Remove unnecessary files
48-
{
49-
const file = path.join(dist, ORT_BUNDLE_FILE);
50-
if (fs.existsSync(file)) fs.unlinkSync(file);
51-
}
52-
53-
// 2. Copy unbundled JSEP file
47+
// 1. Copy unbundled asyncify file
5448
{
5549
const src = path.join(__dirname, 'node_modules/onnxruntime-web/dist', ORT_JSEP_FILE);
5650
const dest = path.join(dist, ORT_JSEP_FILE);
5751
fs.copyFileSync(src, dest);
5852
}
53+
54+
// 2. Remove unnecessary files
55+
{
56+
const file = path.join(dist, ORT_BUNDLE_FILE);
57+
if (fs.existsSync(file)) fs.unlinkSync(file);
58+
}
5959
});
6060
}
6161
}

0 commit comments

Comments
 (0)