unjs / unwasm

🇼 WebAssembly tools for JavaScript
MIT License
173 stars 6 forks source link

Use import maps #10

Closed pi0 closed 8 months ago

pi0 commented 8 months ago

Since unwasm is aware of wasm imports, it can also try to search for them from parent package.json's imports field (docs) to be zero-config for .wasm imports that require a binding.

(Funny, I was thinking about supporting .imports.js file alongside .wasm files as a convention until I suddenly thought, oh hey ESM already got it converted!)

I think this should give us a clear path for package authors' convention (#7)