Open jonhallur opened 4 months ago
There is a new 'es6' target in the lang/javascript Makefile (dev branch). Not tested. I'm just wondering if the wasm file is affected and how it's compatible with both targets (js, mjs).
From the Emscripten docs.
EXPORT_ES6 Export using an ES6 Module export rather than a UMD export. MODULARIZE must be enabled for ES6 exports and is implicitly enabled if not already set. This is implicitly enabled if the output suffix is set to ‘mjs’.
I just changed the Makefile on line 65 to include EXPORT_ES6=1
so I could use it. AFAIK the only change in the JS is that it is wrapped in a promise function, where you can give the module some setting and has an export default
for the file.
Thanks for the info. Actually I used the implicit method i.e. the mjs suffix
To be compatible with modern web framework.