This is the button widget that you import into the app
- dist: the build output folder for the widget. This gets imported by client apps
- example: a nextjs sample app that imports the widget. used for dev
- src: the widget code
The dev experience is different than a normal web app. We need to rebuild the widget on every save so that the example/ web app imports the latest version.
For this we need two processes:
- one for continously building the widget on save
- another for running the example app which imports the build output of the widget
bun run build
cd example && bun dev
If the web app says the @retentful package doesn't exist, try running npm link ../dist
from the example/