Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function wasmShimCandidateUrls

    • Resolve the bundle-relative WASM shim candidates against a base URL, yielding absolute hrefs in try order.

      initWasm calls this with import.meta.url — i.e. the URL of the chunk this module was bundled into — and imports the candidates in order until one loads. The order is part of the contract: the first entry is the one that resolves for the app build and for the library build's worker chunks, so reordering the list would make every ordinary load spend a 404 before reaching the artifact.

      The result is deduplicated, so it is not always two entries: new URL() clamps at the URL root, so a chunk served AT the root (dist/lib/* copied to a site root, the common unbundled deployment) resolves both specifiers to the same href. Keeping the duplicate would cost nothing on the success path but would make a genuine failure report tried, in order: X, X.

      Parameters

      • baseUrl: string

        Absolute URL of the chunk to resolve against.

      Returns string[]

      Absolute candidate hrefs, most-likely first, without duplicates.