-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Feature] Run babel on specific file #15471
Comments
Hey @mohit217! 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. |
https://babeljs.io/docs/options#only Are you looking for it? |
@liuxingbaoyu I want to run a specific plugin only for a specific file. I tried with only as an option for plugin but it didn't work |
Let specific file denoted by npx babel --config-file foo.babel.config.json --out-dir ./foo-output.js ./foo.js In your main Babel config, you should ignore {
"ignore": "./foo.js"
} |
馃捇
What problem are you trying to solve?
I am trying to run Babel on a specific file using babel.config.js but couldn't find out a way to do it. I saw a way to do it https://babeljs.io/docs/options#test using this option but it doesn't use the option and runs on everything.
I found a work around for this here, #5420 (comment) but I want to use just babel instead of webpack.
Describe the solution you'd like
Use test at top level for plugin options.
Describe alternatives you've considered
#5420 (comment)
Documentation, Adoption, Migration Strategy
No response
The text was updated successfully, but these errors were encountered: