Skip to content
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

Reconsider bailing out with BABEL_SHOW_CONFIG_FOR #12425

Closed
nicolo-ribaudo opened this issue Nov 30, 2020 · 1 comment · Fixed by #12954
Closed

Reconsider bailing out with BABEL_SHOW_CONFIG_FOR #12425

nicolo-ribaudo opened this issue Nov 30, 2020 · 1 comment · Fixed by #12954
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@nicolo-ribaudo
Copy link
Member

Bug Report

Current behavior

When using BABEL_SHOW_CONFIG_FOR, the file for which Babel is logging the config is considered as ignored and it's not compiled/handled:

However, all the other files are still compiled. This means that if my build script is babel src -d out, if I have two files (src/main.js and src/dep.js) and I run

BABEL_SHOW_CONFIG_FOR=./src/main.js npm run build

I will get an out folder containing only the dep.js file.

If you want to see this behavior, you can clone https://github.com/nicolo-ribaudo/babel-bug-show-config-behavior and run BABEL_SHOW_CONFIG_FOR=./src/main.js npm run build.

Expected behavior

Either Babel should compile everything, or nothing.

I think the best thing to do would be to still compile the file, so that BABEL_SHOW_CONFIG_FOR only has effect on logging and on nothing else. However, I would be open to ignoring everything.

Additional context

Thanks @laurieontech for the feedback!

@laurieontech
Copy link

Thanks for taking the time to write it up! This would be more intuitive behavior in my mind.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jun 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants