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

Add jsxFrag pragma #1269

Merged
merged 1 commit into from
Nov 20, 2019
Merged

Add jsxFrag pragma #1269

merged 1 commit into from
Nov 20, 2019

Conversation

tamagokun
Copy link
Contributor

Description

If a component is specifying a jsx pragma and is using <></> Fragment shorthand, they must also specify a fragment pragma.

https://babeljs.io/docs/en/next/babel-plugin-transform-react-jsx.html#fragments

Without this, i'm getting an error when using docz in conjunction with a plugin:

node_modules/gatsby-theme-docz/src/components/Sidebar/index.js: transform-react-jsx: pragma has been set but pragmafrag has not been set

Review

  • Check the copy
  • ...
  • ...

Pre-merge checklist

  • ...
  • ...

Screenshots

Before After
Image Image

If a component is specifying a jsx pragma and is using `<></>` Fragment shorthand, they must also specify a fragment pragma.

https://babeljs.io/docs/en/next/babel-plugin-transform-react-jsx.html#fragments
@rakannimer
Copy link
Contributor

Thank you @tamagokun for catching this and fixing it !

@rakannimer rakannimer merged commit e52340b into doczjs:master Nov 20, 2019
@rakannimer
Copy link
Contributor

Released in 2.0.0-rc.76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants