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

Make React compatible with ES Modules and Pika #15885

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
5 participants
@sdegutis
Copy link

commented Jun 14, 2019

See https://www.pika.dev/about/ for basic information about Pika.

When searching for React (https://www.pika.dev/search?q=react) in Pika's interface, it shows:

EXACT MATCH!
react
Package found! However, no ES "module" entrypoint was detected in its package.json manifest. If possible, explore the site for a more web-friendly alternative.

It looks like this commit in my PR is all that's needed, because React is fortunately already written using ES Module syntax.

Make React compatible with ES Modules and Pika
See https://www.pika.dev/about/ for basic information about Pika.

When searching for React (https://www.pika.dev/search?q=react) in Pika's interface, it shows:

```
EXACT MATCH!
react      
Package found! However, no ES "module" entrypoint was detected in its package.json manifest. If possible, explore the site for a more web-friendly alternative.
```

It looks like this commit in my PR is all that's needed, because React is fortunately already written using ES Module syntax.
@facebook-github-bot

This comment has been minimized.

Copy link

commented Jun 14, 2019

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@sdegutis

This comment has been minimized.

Copy link
Author

commented Jun 14, 2019

Ok I just signed the CA.

@sizebot

This comment has been minimized.

Copy link

commented Jun 14, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

@sdegutis

This comment has been minimized.

Copy link
Author

commented Jun 14, 2019

I added a second commit that makes the same exact change for ReactDOM. This PR should now be sufficient for most (all?) React users to now use Pika and ES Modules to load React.

@facebook-github-bot

This comment has been minimized.

Copy link

commented Jun 14, 2019

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@TrySound

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

This won't work. Sources are not ready for consuming.
This is the first step for this #15037
This is the second which is blocked til upgrade is merged.
#13321

@sdegutis

This comment has been minimized.

Copy link
Author

commented Jun 14, 2019

If it's true, that's a shame. Guess we'll have to wait to use React with Pika and use Preact@next in the meantime. Thanks @TrySound. Feel free to close this PR if it doesn't make sense in context of being merged after those two PRs are merged.

@jquense jquense closed this Jun 14, 2019

@sdegutis sdegutis deleted the sdegutis:patch-1 branch Jun 14, 2019

@TrySound

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

From what I see pika is able to provide own version of react for components.
Here react is imported from https://cdn.pika.dev/_/react/v16
https://storage.googleapis.com/pika-web-packages-02/rifm/0.9.1/dist-es2019/rifm.min.js

@sdegutis

This comment has been minimized.

Copy link
Author

commented Jun 14, 2019

Oh perfect, how did I miss that! Thanks @TrySound this will help a ton :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.