[ionic v4 with react] Integrating @ionic/core 4.0 beta defineCustomElements error
See original GitHub issueHi everyone,
I’m having issues integrating Ionic Web Components to a React project.
So far, I have followed these instructions: https://stenciljs.com/docs/framework-integration/#react
However, I get an error saying that defineCustomElements
is not a function?
Error screenshot
Sandbox code
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
App Migration Guide: Documentation to Migrate Ionic 4.x to 5.x
The Ionic Migration Guide provides documentation for how to migrate an app from 4.x to 5.x. Read to learn more about what updates...
Read more >Announcing Ionic React - Ionic Blog
Today we're thrilled to announce the general availability of Ionic React, a native React version of Ionic Framework that makes it easy to ......
Read more >Ionic Tutorial: Mastering Web Components in Ionic Framework
Understanding the new components architecture presented in Ionic 4. Covering everything from styling and customizing Ionic components, to ...
Read more >@ionic/react - npm
React specific wrapper for @ionic/core. Latest version: 6.4.1, last published: 10 days ago. Start using @ionic/react in your project by ...
Read more >Ionic 4 Beta: What's New and Building a Sample App - Auth0
Alongside with that, the official bindings for React and Vue are currently in development. This article will mostly focus on @ionic/angular .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, I see… thanks! (I was also driving insane).
Yeah, it’s confusing. My understanding is that thanks to Ionic 4 components being developed in Stencil, they should be framework agnostic. Seems like that’s not entirely true.
yup same issue here.
Here is why is this happening:
module
package.json field, which points to es2015 module files ( not es5 )which doesn’t export
defineCustomElements
. This function is exported only from themain
bundle, which is wrong.Quick Fix
hope this is gonna be resolved sooner than later ✌️