-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[preset-env - debug] Print targets that need each plugin #13115
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
[preset-env - debug] Print targets that need each plugin #13115
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/45084/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ee87fc9:
|
transform-unicode-regex { ios < 12, safari < 12 } | ||
transform-block-scoping { ios < 11, safari < 11 } | ||
proposal-export-namespace-from { android < 72, chrome < 72, edge < 79, firefox < 80, ios, opera < 60, safari, samsung < 11.0 } | ||
transform-modules-commonjs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if we would want to special case these (mention modules option?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open a follow-up PR for this 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, good idea to give more info instead of repeating
proposal-export-namespace-from {} | ||
syntax-numeric-separator | ||
syntax-nullish-coalescing-operator | ||
proposal-optional-chaining { chrome } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small thing, but I guess this is confusing without looking at the data, that it's because you need to add bugfixes? Seems like it implies chrome doesn't support it.
Guess it'll sorta be fixed when we make it default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, no version of chrome supports optional chaining unless you enable bugfixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Currently we first print the user's targets, and then we print again the same targets next to each plugin.
This PR modify what we print next to each plugin, by making it for example "this plugin is needed for chrome < 71" rather than "this plugin is needed because your targets include chrome 30". By doing so, it's easier to see how changes in the target browser can affect the loaded plugins.