/example-pnpm-vite-react-lib

A React Library Repository Example with pnpm and vite

Primary LanguageJavaScriptMIT LicenseMIT

⚠️ Since there is a react plugin for vite maintained officially, we don't need this guide anymore.

example-pnpm-vite-react-lib

A React Library Repository Example with pnpm and vite.

Install fast with pnpm. Develop fast with vite.

Requirement

Setup

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

License

MIT