Skip to content

Minimal template to get a React component library working in Vite with HMR and ESLint

Notifications You must be signed in to change notification settings

martinkz/vite-react-ts-lib-template

Repository files navigation

React + TypeScript + Vite + Vitest/RTS
Library example

This template provides a minimal setup to get a React component library working in Vite with HMR and ESLint. Includes testing with Vitest and React Testing Library.

It contains a Counter component. If you're looking to use this template as a base for something else, the component name is defined and used in the following files:

  • package.json
  • vite.config.js
  • App.tsx
  • src/Counter.tsx
  • src/index.ts
  • src/test/counter.test.tsx

To preview the production build, comment out the lib/rollup build settings in vite.config.ts before building the project.

About

Minimal template to get a React component library working in Vite with HMR and ESLint

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published