We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can't use React Fragments.
Default babel config
React Fragments should be supported by default.
Using Fragments will make babel throw error
https://github.com/parcel-bundler/parcel/blob/master/packages/core/parcel-bundler/src/transforms/babel/jsx.js#L45
should set the pragmaFrag for React.
pragmaFrag
The text was updated successfully, but these errors were encountered:
In the meantime adding this to your babel plugins solves it:
["@babel/plugin-transform-react-jsx", { "pragmaFrag": "React.Fragment" }]
Sorry, something went wrong.
fix: set default pragmaFrag option 🐛
aedece5
fix parcel-bundler#2305
722e03a
fix: set default pragmaFrag option 🐛 (#2486)
27f769a
fix #2305
Successfully merging a pull request may close this issue.
🐛 bug report
Can't use React Fragments.
🎛 Configuration (.babelrc, package.json, cli command)
Default babel config
🤔 Expected Behavior
React Fragments should be supported by default.
😯 Current Behavior
Using Fragments will make babel throw error
💁 Possible Solution
https://github.com/parcel-bundler/parcel/blob/master/packages/core/parcel-bundler/src/transforms/babel/jsx.js#L45
should set the
pragmaFrag
for React.The text was updated successfully, but these errors were encountered: