Skip to main content

Function: resolveWasmBasePath()

resolveWasmBasePath(defaultDirectory): string

Absolute URL of the directory a set of wasm binaries loads from.

Parameters

defaultDirectory: string = ''

directory to use when nothing has declared one: the standard location its owner copies the binaries into, e.g. ort/ for the ONNX Runtime. Both it and a configured wasmBasePath are resolved the same way — relative to the application, or to the server root when absolute, or used as given when a full URL.

Returns

string

the directory as an absolute URL with a trailing slash, or the unresolved directory when there is nothing to resolve it against (a non-browser context).

Defined in

packages/core/src/utilities/wasmBasePath.ts:57