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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Setting babelrc to false will skip the process of ignoreFile, is this a feature or bug? #16152

Closed
1 task
HydratedPig opened this issue Dec 5, 2023 · 3 comments 路 Fixed by babel/website#2854
Labels
i: question outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@HydratedPig
Copy link

馃捇

  • Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

Demo with @babel/core@^7.23.5

Is this a feature or a bug?

Configuration file name

No response

Configuration

No response

Current and expected behavior

The result I prefer is

babelRunner1
ignore:
console.log('ignore');
main:
console.log('main');

babelRunner2
ignore:
console.log('ignore');
main:
console.log('main');

but the truth is

babelRunner1
ignore:
ignore.js config is null
main:
console.log('main');

babelRunner2
ignore:
console.log('ignore');
main:
console.log('main');

Environment

 System:
    OS: macOS 12.4
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.16.0/bin/npm
    pnpm: 8.5.1 - ~/Library/pnpm/pnpm
  npmPackages:
    @babel/core: ^7.23.5 => 7.23.5 

Possible solution

If it is a bug, the reason maybe locale in here. ignoreFile will not be processed when babelrc is not equal to false.

If it is a feature, just close the issue.

Additional context

No response

@babel-bot
Copy link
Collaborator

Hey @HydratedPig! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

@JLHwung
Copy link
Contributor

JLHwung commented Dec 5, 2023

It is a feature. The .babelignore and .babelrc are both Babel 6 era legacy config files. When babelrc is false, the .babelignore will not be loaded, either. You can specify the ignore option in babel.config.*. We can clarify that in the docs.

@HydratedPig
Copy link
Author

Got it. Thank you!

@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 Mar 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: question 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.

4 participants