@retentful/core
Version:
This is the button widget that you import into the app
31 lines (17 loc) • 904 B
Markdown
# Widget
This is the button widget that you import into the app
## Folders:
- 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
## Getting started
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
### To start the widget build process (this uses the -w option to auto-rebuild on save):
`bun run build`
### In another process, start the web app:
`cd example && bun dev`
### Troubleshooting
If the web app says the @retentful package doesn't exist, try running `npm link ../dist` from the `example/`