-
Notifications
You must be signed in to change notification settings - Fork 214
react-components preset should compile down to es5 by default #722
Comments
So IMO libraries like this should provide both an ES6 version (accessible via the That said, this really is the territory of rollup (see the vast majority of other libraries that produce multiple variants) - I wonder if it would be a better fit compared to Neutrino/webpack in these cases? |
@eliperelman thoughts on suggesting people use rollup instead for this use case? I know it means familiarity for people who use Neutrino elsewhere, but I'm not convinced webpack is superior to rollup for this use case. |
The superiority may be temporary, and for that reason I don't see why we need to recommend another tool. Documenting the tradeoffs may be good, but we should let users determine whether the tradeoffs warrant the use of another tool over the benefits of shared configuration. |
Fair point. The problem at the moment is that there's no one maintaining the preset and it currently generates broken (by best practice standards) output. I don't use this preset or have time to look at it, so I don't see it getting fixed any time soon. |
It's not necessarily broken, just that it doesn't work everywhere. If you generate a component, and you use that component in a Neutrino-based React project, it will work. It just doesn't work as-is in a CRA project. I do use this, though, so I will fix it. |
Putting !ES5 content in |
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. |
If we don't do this, the resulting minified js won't be useable by tools like create-react-app (see e.g. metricsgraphics/react-metrics-graphics#18).
Current suggested workaround (could probably be used as a basis of a solution here):
https://github.com/eliperelman/react-fout-stager/blob/67b13f839701438334863f42b8c859595eb3bf6b/.neutrinorc.js#L13
The text was updated successfully, but these errors were encountered: