⚠️ Since there is a react plugin for vite maintained officially, we don't need this guide anymore.
A React Library Repository Example with pnpm and vite.
Install fast with pnpm. Develop fast with vite.
First, install the dependencies:
pnpm install
Now you can develop your library in the demo page:
cd packages/demo
pnpm run dev
You can also build and preview the demo page:
cd packages/demo
pnpm run build
pnpm run serve
You can build both esm
and umd
library production with one command:
cd packages/lib
pnpm run build
MIT