Commit 50b719a
Fix inference unable to run due to JS WASM runtime not being bundled into
### Description
Fixes inference error from `ort-wasm-simd-threaded.mjs` not being
bundled into `ort.wasm.bundle.min.mjs` as it is for other
`bundle.min.mjs` builds.
### Motivation and Context
To decrease my app's bundle size, I followed the [conditional importing
guide](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js/importing_onnxruntime-web#conditional-importing)
and imported the WASM-only build:
```diff
- import * as ort from 'onnxruntime-web';
+ import * as ort from 'onnxruntime-web/wasm';
```
After this change, creating an inference session would result in:
`TypeError: Failed to resolve module specifier
'./ort-wasm-simd-threaded.mjs'`.
This was because `ort-wasm-simd-threaded.mjs` was not bundled into the
build at `onnxruntime-web/wasm`, which points to
`ort.wasm.bundle.min.mjs`, despite how its name suggests. In other
builds with `bundle` in their name, the module is bundled, yet it was
not done so in the WASM one. This PR bundles the Javascript WASM runtime
in to match the other builds, fixing the error.onnxruntime-web/wasm build (microsoft#24836)1 parent 3bd7c79 commit 50b719a
3 files changed
+28
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
648 | 653 | | |
649 | 654 | | |
650 | 655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
0 commit comments