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

fix: ignore babelrc #2766

Merged
merged 1 commit into from
Mar 31, 2021
Merged

fix: ignore babelrc #2766

merged 1 commit into from
Mar 31, 2021

Conversation

underfin
Copy link
Member

fix #2722

Description

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@Shinigami92 Shinigami92 self-requested a review March 29, 2021 16:21
@Shinigami92 Shinigami92 added the p2-nice-to-have Not breaking anything but nice to have (priority) label Mar 29, 2021
@Shinigami92 Shinigami92 removed their request for review March 29, 2021 18:44
Comment on lines 84 to +85
const result = babel.transformSync(code, {
babelrc: false,
Copy link
Member

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.

Copy link
Member

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

Copy link
Member

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.

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?

Copy link
Member

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 yyx990803 merged commit 23c4114 into main Mar 31, 2021
@Shinigami92 Shinigami92 deleted the ignore-babelrc branch March 31, 2021 07:37
@kjeske
Copy link

kjeske commented May 5, 2021

@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.

@Niputi
Copy link
Contributor

Niputi commented May 5, 2021

@kjeske you should create a new issue with a feature request for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding @babel/preset-env cause error
8 participants