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

fix: set default pragmaFrag option 🐛 #2486

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

lili21
Copy link
Contributor

@lili21 lili21 commented Jan 1, 2019

fix #2305

↪️ Pull Request

💻 Examples

🚨 Test instructions

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

require('@babel/plugin-transform-react-jsx'),
{
pragma,
pragmaFrag: 'React.Fragment'
Copy link
Member

Choose a reason for hiding this comment

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

We will need to create a mapping similar to the one for pragma for other react-alike libraries (preact etc.) if they also support fragments.

Copy link

@adrianmcli adrianmcli Feb 9, 2019

Choose a reason for hiding this comment

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

@lili21 Do you have an idea for how to do this?

EDIT: did some research, see below.

Choose a reason for hiding this comment

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

@devongovett There is no official support for fragments in Preact, NervJS, and HyperApp.

Can't we merge this PR for now and add support for those libraries when they officially support it? It's frustrating to have to add a config for something that is supported to be the default option in Babel.

We are literally forcing users to do more configuration than the default Babel behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree.

@adrianmcli
Copy link

I am happy to open a new PR for this as it seems this PR is now out of sync and hasn't had any attention for a while.

@adrianmcli
Copy link

@lili21 Can you rebase off master? And can @devongovett review this again and merge it? Please take into consideration my comments here: #2486 (comment)

Copy link
Member

@DeMoorJasper DeMoorJasper left a comment

Choose a reason for hiding this comment

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

Looks good as the other frameworks don't support fragments yet

@DeMoorJasper DeMoorJasper merged commit 27f769a into parcel-bundler:master Feb 27, 2019
@adrianmcli
Copy link

Thanks everyone!

@lili21 lili21 deleted the fix/pragma-frag branch February 28, 2019 03:22
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.

pragma has been set but pragmafrag has not been set
5 participants