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
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/wasm". Strict MIME type checking is enforced for module scripts per HTML spec.
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: .13.0
rustc version: 1.81.0 (eeb90cda1 2024-09-04)
The text was updated successfully, but these errors were encountered:
I feel a new target option would be useful, --target web-top-level-await that would produce mostly the same code, the only addition would be to append this single line to the js file:
🐛 Bug description
Current generated code make use of
import * as wasm from "./<lib>.wasm"
This does not work in browser and require a bundler
🤔 Expected Behavior
I expect wasm-pack to generate package that can be imported without transformation in modern browser
👟 Steps to reproduce
see reproduction repo here : https://github.com/bug-reproduction/wasm-pack-in-browser
Then launch a server:
navigate to http://localhost:8888/
open the console and see
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: .13.0
rustc version: 1.81.0 (eeb90cda1 2024-09-04)
The text was updated successfully, but these errors were encountered: