Fix inference unable to run due to JS WASM runtime not being bundled into onnxruntime-web/wasm
build
#24836
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes inference error from
ort-wasm-simd-threaded.mjs
not being bundled intoort.wasm.bundle.min.mjs
as it is for otherbundle.min.mjs
builds.Motivation and Context
To decrease my app's bundle size, I followed the conditional importing guide and imported the WASM-only build:
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 atonnxruntime-web/wasm
, which points toort.wasm.bundle.min.mjs
, despite how its name suggests. In other builds withbundle
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.