This project contains a monorepo initialized with React + Vite and Stencil + Vite.
The idea behind this is to allow everyone to create UI components using React, and then export them as Web Components using Stencil.
The provided Web Component example is micro-lc-element-composer ready: it supports the injection of the eventBus
property.
To build React components you can run: yarn react build
, or simply yarn build
inside the packages/react
folder.
The build file will produce a dist
folder inside packages/react
.
To build Stencil components you can run: yarn stencil build
, or simply yarn build
inside the packages/stencil
folder.
The build file will produce a dist
folder inside packages/stencil
.
To preview Stencil components you can run: yarn stencil start
. This will spin up a dev server on localhost:3333
.
To insert and configure multiple Web Components you can edit the index.html
file inside the packages/stencil
folder.