You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main contributor for Plunker wrote in the next message that it can be an issue of jsDelivr or Box2D-WASM: plnkr/feedback#597 (comment) So I created the issue for Box2D-WASM too: Birch-san/box2d-wasm#61
<!DOCTYPE html><html><head><metacharset="utf-8"><title>Example</title></head><body><!-- Since import maps are not yet supported by all browsers, its is necessary to add the polyfill es-module-shims.js --><scriptasyncsrc="https://unpkg.com/es-module-shims@1.7.3/dist/es-module-shims.js"></script><scripttype="importmap">{"imports": {"box2d-wasm": "https://cdn.jsdelivr.net/npm/box2d-wasm@7.0.0/+esm","gl-matrix": "https://cdn.jsdelivr.net/npm/gl-matrix@3.4.3/+esm"}}</script><scripttype="module" src="./js/index.js"></script></body></html>
This looks like an ESM version of #18488 where the /+esm suffix breaks resolving of relative paths constructed based on import.meta.url. We rewrite paths for import() calls but dynamically constructed fetch() won't work for with relative paths with our current implementation.
<!-- Since import maps are not yet supported by all browsers, its is necessary to add the polyfill es-module-shims.js --><scriptasyncsrc="https://cdn.jsdelivr.net/npm/es-module-shims@1.8.3/dist/es-module-shims.min.js"></script><scripttype="importmap">{"imports": {"box2d-wasm": "https://unpkg.com/box2d-wasm@7.0.0/dist/es/Box2D.js","gl-matrix": "https://cdn.jsdelivr.net/npm/gl-matrix@3.4.3/+esm"}}</script><scripttype="module">import{mat4,vec3}from"gl-matrix";constv=vec3.fromValues(1,2,3);console.log(v);constm=mat4.create();console.log(m);</script><!-- <script type="module" src="./js/index.js"></script> -->
Description
The main contributor for Plunker wrote in the next message that it can be an issue of jsDelivr or Box2D-WASM: plnkr/feedback#597 (comment) So I created the issue for Box2D-WASM too: Birch-san/box2d-wasm#61
I try to use the
box2d-wasm@7.0.0
ESM link from here: https://www.jsdelivr.com/package/npm/box2d-wasmIt doesn't work on Plunker, and it doesn't work locally on my laptop (I have the same errors, see errors below):
But it works on PlayCode: https://playcode.io/1527756
I uploaded Box2D-WASM files on GitHub Pages:
So it works locally and on Plunker if I use the next link: https://8observer8.github.io/lib/box2d-wasm-7.0.0-box2d-2.4.1/box2d-wasm.min.js You can just replace the jsDelivr link with this one.
index.html
index.js
init-box2d.js
But I have these errors:
Affected jsDelivr links
https://cdn.jsdelivr.net/npm/box2d-wasm@7.0.0/+esm
Response headers
None
Information
Requisites
Additional content
No response
The text was updated successfully, but these errors were encountered: