Open rauschma opened 7 years ago
What does "bin"
solve that isn't already solved by "engines"/"bin"
? May be a bit simpler if the proposal were restricted to browser bundles.
The idea is to deliver different binaries for different versions of Node.js, within the same package. Personally, I don’t have a need for it. It could probably be omitted in a first version of a standard and be added later, should it become necessary.
I like the idea of starting with browser bundles. Then "engines"
is probably not a good name, because it clashes with Node, at the moment. It should be neutral enough, though, that adding support for Node later doesn’t feel weird.
I think it is the right direction, but we should adopt a more granular/modular approach.
ES2015 may indeed be transpiled to ES5, except for Proxies. Same goes for other modern features for a target ES3 runtime.
So I'm thinking of something like autoprefixer, plus a way to alert the user that a given source feature to destination runtime transformation is impossible (i.e. an error message like Looks like you're targeting browser <FOO> but module <BAR> requires feature <BAZ>, which can't be transpiled.
)
Maybe related to https://github.com/jsforum/jsforum/issues/5? 🤔
I’d love to have something like this:
An additional entry (similar to
"main"
) could be"files"
, which would work like"browser"
.Use cases: