-
-
Notifications
You must be signed in to change notification settings - Fork 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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ignore babelrc #2766
fix: ignore babelrc #2766
Conversation
const result = babel.transformSync(code, { | ||
babelrc: false, |
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.
Does this actually need to be specified explicitly for plugin-vue-jsx
? Babel docs suggests that babelrc
only defaults to true if we provide a filename
like in plugin-react-refresh
, and false otherwise.
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 had the same opinion
My idea: we should add a comment referencing a newly created issue to track it for later
Or just a TODO
or FIXME
or so
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 think babelrc
's default value being dependent on another option is a footgun, so it's good to be explicit here - just in case we need filename
to be passed here in the future.
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.
@yyx990803 hi, @vitejs/plugin-react-refresh haven't upgraded yet?
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 do the release later today
@yyx990803 Will there be any way to provide additional babel plugins to the configuration of plugin-react-refresh? Before the change from this PR I was able to do it in the .babelrc file, but now it's not possible. I would need it for emotion babel plugin, that enables a lot of features for development with Emotion. |
@kjeske you should create a new issue with a feature request for that. |
fix #2722
Description
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).