Here's a familiar ritual: I have an idea for a TypeScript library. I'm excited to build it. Then I spend 20 minutes
configuring tsconfig.json, wrestling with dual CJS/ESM exports, and wondering why type generation isn't working.
pnpm create vite gets me 60% there, but leaves me manually wiring up vite-plugin-dts and testing. GitHub template
repos swing too hard the other way—opinionated lint rules, folder structures I don't want, dependencies I immediately
delete.
So I made exactly what I needed: vite-typescript-scaffold
What you get
| Feature | Why it matters |
|---|---|
| Dual CJS/ESM builds | Your library works everywhere without configuration headaches |
| Automatic type definitions | vite-plugin-dts generates .d.ts files on build |
| Vitest ready | Testing works out of the box—no setup required |
| One-command init | ./init.sh <name> <author> <email> renames everything instantly |
What's intentionally missing
- No framework lock-in
- No ESLint/Prettier debates
- No
src/vslib/opinions - No CI configs you'll override anyway
Clone it, run the init script, start writing code. That's it.
git clone https://github.com/asadbek064/vite-typescript-scaffold
cd vite-typescript-scaffold