Skip to content

Unable to use any CDN for ESM #394

@WebReflection

Description

@WebReflection

With recent split of the wasm file from the main module and recent module changes where UMD is preferred (a pretty defunct module kind on the Web as inherently incompatible with ESM) it's fairly impossible to use a CDN to run this project.

Assuming I use this end point:

https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.5.0/dist/esm/browser.js

the import from @bjorn3/browser_wasi_shim breaks everything.

Assuming I use the CDN to deliver https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.5.0/+esm I don't get the same export fields or the same logic actually present in the previous export.

unpkg breaks with ?module appended, esm.run fails, jsdelivr can't serve ESM.

Is there any plan to ship a proper ESM module or a different folder / dist structure that could benefit from these CDNs?

REaching the counter .wasm file is OK-ish, even if elsewhere, but the entry ESM point is basically unusable, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions