-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add debug option if env preset selected. #1225
Conversation
return item.name + ' ' + JSON.stringify(item.targets); | ||
} | ||
|
||
function onEnvBuild(node, opts, envResult) { |
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.
One thing to consider is, that once babel/babel-preset-env#241 lands, we're likely going to follow that up with plugin-dependent debug output.
We might want to expose the debug output from directly from the plugin on onPresetBuild
instead of needing to reconstruct it from structured data?
(And, maybe even stepping further back, @hzoo and I were discussing that maybe having debug output for every transform would be really useful... so this might be the beginnings of a consistent way of accessing it?)
Not something we need to address until v2.x and B7 drop, just food for thought.
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.
@existentialism Yeah. I think there would be a couple of changes after 2.0 merge. So we'll keep our fingers on the pulse.
We might want to expose the debug output from directly from the plugin on onPresetBuild instead of needing to reconstruct it from structured data?
Initially, I had chosen this way, but decided that we could come up with awesome UI idea to display plugins/built-ins neat (maybe in the table or with the better colorful console). 🌅
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.
Yeah, definitely! I think there's value in both raw debug + structured data.
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.
Also, seems like we depend on https://github.com/yavorsky/babel-preset-env-standalone, so maybe move it to babel/babel-preset-env-standalone? I can ask him 🙂.
With evaluate:
With huge output (scrollable):
debug
option is appearing only when env preset was selected (like built-ins).