File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,13 @@ export const initializeWebAssembly = async (flags: Env.WebAssemblyFlags): Promis
194194 if ( wasmBinaryOverride ) {
195195 // Set a custom buffer which contains the WebAssembly binary. This will skip the wasm file fetching.
196196 config . wasmBinary = wasmBinaryOverride ;
197+
198+ // Offer an implementation of locateFile() that returns the file name directly. This helps to avoid an error
199+ // thrown later from the following code when `import.meta.url` is a blob URL:
200+ // ```
201+ // return new URL("ort-wasm-simd-threaded.jsep.wasm", import.meta.url).href;
202+ // ```
203+ config . locateFile = ( fileName ) => fileName ;
197204 } else if ( wasmPathOverride || wasmPrefixOverride ) {
198205 // A callback function to locate the WebAssembly file. The function should return the full path of the file.
199206 //
You can’t perform that action at this time.
0 commit comments