Skip to content

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

Closed
underfin wants to merge 4 commits into
mainfrom
react-refresh-babel-plugins
Closed

feat(plugin-react-refresh): support configure babel plugins#3319
underfin wants to merge 4 commits into
mainfrom
react-refresh-babel-plugins

Conversation

@underfin
Copy link
Copy Markdown
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.

Comment thread packages/plugin-react-refresh/index.js Outdated
```js
export default {
plugins: [reactRefresh({
plugins: ['@emotion/babel-plugin']
Copy link
Copy Markdown
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
Copy Markdown
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'
    ]
  })

Comment thread packages/plugin-react-refresh/index.js Outdated
@kjeske
Copy link
Copy Markdown

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-cat May 26, 2021 16:11
@antfu antfu added the on hold label May 29, 2021
@antfu
Copy link
Copy Markdown
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
Copy Markdown
Contributor

#3588

@antfu
Copy link
Copy Markdown
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