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

not ES module #39

Closed
nikitapilgrim opened this issue Apr 11, 2019 · 4 comments
Closed

not ES module #39

nikitapilgrim opened this issue Apr 11, 2019 · 4 comments

Comments

@nikitapilgrim
Copy link

✖ dependency "react" has no ES "module" entrypoint.
Its fixable?

@FredKSchott
Copy link
Owner

Not until React ships a "module" ESM build. Until then, replace all imports of "react" with an ESM-flavored build like "es-react"

It may even be worth adding a react-specific error to our console log given how common this probably is

@nikitapilgrim
Copy link
Author

But i can use wrapper for import, export for non ES module and then use in pika custom path dependencies to wrapper? If possible, how to specify the custom path in pika?

@FredKSchott
Copy link
Owner

you know, it would be very interesting if we could support custom wrappers. This would give us CJS support, but also allow you to use a customer wrapper of only the exports you wanted, which would allow @pika/web to tree-shake out the rest.

@FredKSchott
Copy link
Owner

Support for common.js dependencies has been added, and we now have a workaround for using React: https://github.com/pikapkg/web#a-note-on-react

Hope that helps!

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

No branches or pull requests

2 participants