Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A simple library template starter for Vite with TypeScript, Prettier, Vitest, Bun, Renovate and np.

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
Vite TypeScript Library Starter is a GitHub boilerplate template that scaffolds a publishable JavaScript/TypeScript library using Vite library mode, TypeScript, Vitest, Bun, Prettier, Renovate, and np, created by developer matronator.
Vite TypeScript Library Starter is a starter template for developing libraries with Vite and TypeScript. It takes an empty project scaffolded via clone, GitHub's "Use this template" button, ZIP download, or the degit command, and produces a TypeScript library project with preconfigured build, test, formatting, and publishing tooling. The template is authored by GitHub user matronator, targets Vite library mode for bundling, and relies on dts-bundle-generator to generate type declaration files.
Vite TypeScript Library Starter ships with seven tool integrations and a documented 11-step publishing checklist.
npm run build generates production files for npm distribution from the source in the src folder.dts-bundle-generator.config.js file controls the output declaration file through its outFile field, which you rename to match your library.tests folder and run on Vitest, Vite's native test runner, so test setup mirrors the build configuration.bunx degit matronator/vite-ts-lib-starter my-new-library scaffolds a new project in one command.npm run release script runs np, which improves the standard npm publish experience with additional checks and prompts.Vite TypeScript Library Starter fits developers who publish JavaScript libraries and want build, test, and release tooling decided for them.
The template supports three practical workflows that cover the lifecycle of a library project from scaffolding to publishing.
src, run npm run build, then publish with npm publish or the np-based npm run release.tests folder, run them through Vitest, and keep code formatted with Prettier..github/FUNDING.yml to add a GitHub Sponsors funding link.Install by cloning the repository, clicking "Use this template" on GitHub, downloading the ZIP, or running bunx degit matronator/vite-ts-lib-starter my-new-library. After installation, follow the README checklist: rename package.json fields, set the outFile in dts-bundle-generator.config.js, replace the logo and funding file, then write code in src and tests in tests. When the library is ready, npm run build produces the production files, and npm publish or npm run release ships them.
Yes. It is a public GitHub template repository, and the repository includes a LICENSE.md file that you are instructed to personalize. The author also accepts GitHub Sponsors contributions, but the template itself is open for anyone to clone or use as a GitHub template.
The template bundles Bun, Vite, TypeScript, Vitest, Prettier, Renovate, and np. Vite compiles the library in library mode, Vitest runs the tests, Prettier formats the code, Renovate automates dependency updates, and np provides a clearer publishing flow.
You can click the "Use this template" button on the GitHub page, clone the repository, download it as a ZIP, or run bunx degit matronator/vite-ts-lib-starter my-new-library. All four options produce a fresh copy that you can rename and customize.
The README lists 11 steps: update package.json, change the outFile in dts-bundle-generator.config.js, replace the logo, modify .github/FUNDING.yml, replace README.md, change the name in LICENSE.md, replace CHANGELOG.md, then build and publish.