Closed flash1293 closed 6 years ago
I think this is reasonable, and I am thinking the same thing about react-components as well so they play well with CRA by default. The tradeoff here comes with the size expense.
@mozilla-neutrino/core-contributors thoughts?
Or ideally compile to both - one for the project's main
and the other for module
.
See also #722.
one for the project's
main
and the other formodule
.
From what I've been reading, the current practice still seems to be compile to ES5 for both main
and module
, just that the main
uses CJS and module
uses ES imports.
That said, with the current master implementation you would need to run webpack twice or export an array of configs since there is no longer any fork middleware.
This doesn't block a Neutrino v9 alpha - however since it's a breaking change, someone would need to start working on this soon or else it's not going to make Neutrino 9 final, and would then have to wait until Neutrino 10.
IMHO the library preset should configure babel to compile to standard ES5 to be consumable by uglify, incuding async/await and other language features.