New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow defaults
query in preset-env
#8897
Conversation
existentialism
commented
Oct 18, 2018
Q | A |
---|---|
Fixed Issues? | Fixes #7405 |
Patch: Bug Fix? | Y |
Major: Breaking Change? | N |
Minor: New Feature? | N |
Tests Added + Pass? | Yes |
Documentation PR Link | |
Any Dependency Changes? | |
License | MIT |
99a54ba
to
0a2a20b
Compare
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9288/ |
0a2a20b
to
4601351
Compare
Is there a feature which shouldn't be transformed when using Browserlist's default target? If so, we could add it to the tests, to test the difference between "default targets" and "no targets" |
@nicolo-ribaudo part of the issue is, while we can handle usage of "defaults" when the query is passed directly as an option to the preset, if a user relies on browserslist to resolve the config (like via .browserslistrc or package.json) then our behavior of "no targets means the same as preset-latest" is difficult to do since we wont' be able to know whether the user didn't have targets or wants For now, seems like just documenting this difference seems okay? |
I guess the best solution would be to check ourself if there is a browserlist config in the fs if there are not targets specified. We could do this with |
I agree, we should do that in the next major release |