bitovi / react-to-web-component

Convert react components to native Web Components. Works with Preact too!
https://www.bitovi.com/open-source/react-to-web-component
MIT License
681 stars 41 forks source link

How can one build a Web Component and then import it into the website? #134

Closed Vulwsztyn closed 11 months ago

Vulwsztyn commented 12 months ago

Hi, your library seems to exactly match my use-case (creating web components with mui or elastic ui to be used in angular), but I do not understand how I am supposed to use it to build the js file/bundle and then import it into the html of the website. I found https://github.com/bmomberger-bitovi/web-components-example, but still failed to get the components to work.

daniel-ricado commented 12 months ago

gotta admit the docs seem to completely omit how do build and import the web component. I'd guess the script "build:wc": "node vite-build.mjs" in package.json is what we're looking for

Vulwsztyn commented 12 months ago

Yeah, but even after they are built I have a problem with importing them: https://github.com/bmomberger-bitovi/web-components-example/issues/1

tcoopman commented 11 months ago

I think I have the same issue, I can build the umd files, but when I import that file in a Githubissues.

  • Githubissues is a development platform for aggregating issues.