Skip to content
/ Library Mode

Documentation

Library Mode

Generate a publishable ESM component package with Storybook.

--type library generates an ESM-only component package.

bash
npm create bonesmith@latest my-lib -- --type library

What it includes

  • It builds with vp pack (Vite+) or Vite library mode. Output is dist/index.js and dist/index.d.ts, plus ./styles.css when the styling option emits CSS.
  • react and react-dom are peer dependencies, as are MUI and Mantine when you pick them.
  • Storybook is always included. Stories run as Vitest browser tests (Playwright Chromium) as part of test, and build-storybook builds the static site.
Routing and state are not used in library mode. Passing --routing or --state is an error.