/sample-library-vite

Example of building a library with vite and test it locally with npm link

Primary LanguageCSSMIT LicenseMIT

sample-library-vite

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.

run easily

  • 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