Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants