-
Notifications
You must be signed in to change notification settings - Fork 214
Review @web's preset-env/targets options #1492
Comments
A few thoughts:
|
I knew it felt like we kind of went over this before…found the existing discussion: #1141
|
Personally, I don't have a problem with how it works now, but I think a console warning could be nice. |
I'd forgotten we'd discussed in as much depth at that time - doh!
Ah yes I'd forgotten this. TBH I'm not very keen on the package.json/env var locations.
Yeah I guess what made me reconsider is the fact that other tooling (such as eslint compat plugins or ...) uses
For users that have a If we were to go with a console warning this wouldn't be a breaking change, but if we want to change default behaviour it would, so deciding an approach potentially blocks the Neutrino 9 release, so keen to pick soon. |
Agreed.
I'm thinking just ignore…seems like a rare scenario.
That's why I use it… in addition to preset-env, postcss/autoprefixer uses it. |
By default, the generated project includes a browserslist configuration in your package.json file: https://create-react-app.dev/docs/supported-browsers-features/#configuring-supported-browsers So that would be similar to writing a .browserslistrc file, which sounds like we both prefer vs. env/package.json |
I think my vote is for……………writing a |
At this point I'm open to pretty much any of the options! Could you describe a bit more about migration path for existing vs new projects? |
@edmorley for
|
Sounds good to me; want to open a PR? :-) |
yep – should be able to get something today/tomorrow. |
Sorry got slammed this week…I'll try to fit this in yet, but no promises :( |
@edmorley still trying to get to this this week, but let me know where you think it stands relative to the v9 release. Obviously it's breaking and would be good to get it in, but wouldn't be a horrible change to wait for v10 for if it is the only thing preventing a v9 release. That said, I've been on v9 RCs for a long time so it doesn't really affect me, but I know others are itching for an official release. |
Thinking about this more, it's likely going to take a few iterations of polishing migration/UX/docs, which would mean needing several more RCs. As such, I think it's best if this doesn't block Neutrino 9.0.0 final. We can always publish a v9 point release in the future that uses one of the non-breaking options discussed above to improve the issue here until Neutrino 10 is released :-) |
@edmorley I think that's a good call. I'll work on a PR for v10 soon enough. |
I find it a bit awkward that for
@babel/preset-env
to use a.browserslistrc
file (which is@babel/preset-env
's default behavior when no targets is passed), I have to remember to passtargets: false
: https://github.com/neutrinojs/neutrino/blob/master/packages/web/index.js#L116-L128A the very least, I propose we look for a browserslist file, and if one is present, output a notice the console that you may want to pass
targets: false
if you want to use it.Thoughts, @neutrinojs/core-contributors ?
The text was updated successfully, but these errors were encountered: