Example of building a library and consume locally by other app.
Steps to build and use library
- Use vite-plugin-dts to generate
.d.ts
. - Use lib from vite configuration
- Update package to make references to library bundled
- Link library with npm link
Inspired on React Component Library with Vite and Deploy in NPM with a few changes.
- Clone repo
- Move to report folder
- Run
npm run init
and it will install, build, link everything for you, lastly it will run the cosumer application on local server