[RFC] Discuss WASM, WASM Fallback package resolution support
TheLarkInn opened this issue · comments
We are getting closer and closer to seeing the environment start to support Web Assembly module support. I think there is great merit to get a head of the curve in implementing the specification for wasm and wasm-fallback field support so that we don't have a variety of resolution patterns etc.
I would assume we have to take in consideration:
assembly:
field?- node fallback vs browser fallback ?
- is separate fallback field from
module
ormain
?
//CC @nolanlawson @guybedford @sokra @jhnns @substack
I think it's time for a single repo or GitHub org to document all these package.json
extensions, including ad-hoc community ones. If nothing else, it's useful to track their support in various bundlers, and to have a shared space where bundler authors and the community can discuss the tradeoffs of one system vs another.
E.g. all these fields:
"browser"
"jsnext:main"
(deprecated)"module"
(rollup has best docs AFAICT)"es2015"
(angular is using it)"react-native"
(see this PR)"chromeapp"
(?)"electron"
(?)- etc.
package.json
is quickly becoming the shared commons where bundlers collaborate on "standards." But, like web standards, I think there ought to be one space where the spec can live. package-browser-field-spec
is a great start; can we move it to a new community org, extend it, etc.?
Sorry for derailing the conversation, but it just seems to me that "assembly"
is a good time to discuss this. 😃 Especially as many of these fields interact with each other (e.g. "module"
with "browser"
), it'll become increasingly important to have one standard to point to.
/cc @Rich-Harris
A common standard definitely makes sense. It should be very simple though 😁