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

feat(plugin-react-refresh): support configure babel plugins #3319

Closed
wants to merge 4 commits into from

Conversation

underfin
Copy link
Member

@underfin underfin commented May 9, 2021

fix: #3276

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.

```js
export default {
plugins: [reactRefresh({
plugins: ['@emotion/babel-plugin']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
plugins: ['@emotion/babel-plugin']
babelPlugins: ['@emotion/babel-plugin']

Should we be more explicit here?

Copy link
Member Author

@underfin underfin May 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think plugins is ok, like parserPlugins. The users should be aware the react-refresh is construct on babel.

reactRefresh({
    parserPlugins: [
      'classProperties',
      'classPrivateProperties'
    ]
  })

@kjeske
Copy link

kjeske commented May 19, 2021

Thanks for the PR! How the process will follow from now with the review and merging? It's just waiting in the queue? Who prioritizes the PRs for reviewing and then merging?

@nihalgonsalves nihalgonsalves requested a review from patak-dev May 26, 2021 16:11
@antfu antfu added the on hold label May 29, 2021
@antfu
Copy link
Member

antfu commented May 29, 2021

After the discussion with Evan, we planed to rename plugin-react-refresh to plugin-react to provide more generic react support, so as new JSX syntax and babel plugins support. Marked this PR on hold.

/cc @aleclarson would you like to take care of the renaming and migrate process?

@aleclarson
Copy link
Member

#3588

@antfu
Copy link
Member

antfu commented May 30, 2021

Close in favor of #3588

@antfu antfu closed this May 30, 2021
@antfu antfu deleted the react-refresh-babel-plugins branch December 24, 2021 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Providing additional babel plugins for plugin-react-refresh
6 participants