darkmoon_uk
07/12/2023, 5:54 AMwasmBrowserRun (Everything works great!) 🎉 blob smile ❤️ wasm
Yay! Now let's distribute and host it...
wasmBrowserDistribution (What? Everything is broken!) blob scream 💔
The naming of output files has changed from mjs to js and the <projectname>.uninstantiated.mjs file that was apparently used to bootstrap the App is completely missing (what is this?)
This means important references in the static index.html and load.mjs files are now wrong... so my WASM App won't load at all.
If this is a general web/webpack difference between Development and Production file layouts, then how should we handle the necessary changes to index.html and load.mjs between these two configurations?darkmoon_uk
07/12/2023, 5:55 AMdarkmoon_uk
07/12/2023, 5:57 AMdarkmoon_uk
07/12/2023, 6:05 AMmjs file and the difference to js, but they haven't explained to this lowly native developer why we're seeing alternate types generated for Dev vs. Production and how I'm supposed to deploy a WASM App.darkmoon_uk
07/12/2023, 6:08 AMdarkmoon_uk
07/12/2023, 6:38 AMhomepage.js file instead of the old uninstantiated one yields
Uncaught SyntaxError: The requested module './homepage.js' does not provide an export named 'instantiate'darkmoon_uk
07/12/2023, 6:38 AMdarkmoon_uk
07/12/2023, 7:00 AMinstantiate, main, start, startup and (at Google Bard's suggestion) __wasm_bindgen_instantiate but none work.Oliver.O
07/12/2023, 8:43 AM.mjs files are really just .js files meant to be ESModules. The file name doesn't matter, but being declared a module does. And the export statement in a module must match the import expectations on the consumer side. I'm stil a bit puzzled how Kotlin/Wasm distributes its stuff, but I guess we'll all be learning along the way.darkmoon_uk
07/12/2023, 10:53 AMOliver.O
07/12/2023, 10:57 AMdarkmoon_uk
07/12/2023, 11:01 AM