yew-wasm-pack-minimal icon indicating copy to clipboard operation
yew-wasm-pack-minimal copied to clipboard

Example fails to load: Uncaught (in promise) LinkError

Open jdm204 opened this issue 4 years ago • 0 comments

Hi,

Really like Yew so far, but I keep running into a problem where when I tweak something small in the html! macro, and then suddenly see nothing in the browser anymore. Typically this has been something like changing <input /> to ` - suddently nothing renders and I get a 'LinkError' in the console.

I struggled to get a good reproducible example until I tried starting from scratch with this repo and I get a similar problem - no "Hello world" displayed in the browser, and in the browser console I get: Uncaught (in promise) LinkError: import object field '__wbindgen_closure_wrapper287' is not a Function.

Reproduction:

git clone https://github.com/yewstack/yew-wasm-pack-minimal
wasm-pack build --target web
rollup ./main.js --format iife --file ./pkg/bundle.js
python -m http.server 8080

jdm204 avatar Aug 15 '20 11:08 jdm204