A lightweight and modern starter template for TypeScript projects using Vite, now with an easy-to-use CLI tool.
- ⚡️ Fast development with Vite
- 🔵 TypeScript support out of the box
- 📦 Minimal dependencies
- 🧩 Simple and clean project structure
- 🛠️ Easy scaffolding with CLI tool
- 🔄 Support for npm and Bun
Create a new project with a single command using bunx:
bunx @mrbrunowolff/minimal-vite my-projectThe interactive CLI will:
- Ask for your project name (or use the provided one)
- Let you choose between npm or bun as package manager
- Set up everything for immediate development
After creating your project:
# Navigate to your project
cd my-project
# Start the development server
bun startYour app will be available at http://localhost:3000 with hot module replacement enabled.
bun run buildThe optimized production build will be in the dist directory, ready for deployment.
bun run previewminimal-vite/
├── src/
│ ├── main.ts # Application entry point
│ ├── style.css # Global styles
│ └── vite-env.d.ts # TypeScript declarations for Vite
├── index.html # HTML template
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies and scripts
└── vite.config.ts # Vite configuration
This template is intentionally minimal to serve as a clean starting point. You can easily extend it with:
- 🔄 Frontend frameworks like React, Vue, or Svelte
- 🎨 CSS preprocessors like SASS or LESS
- 🧪 Testing libraries
- 🔍 Linting and formatting tools
# Install React
bun add react react-dom
bun add -D @types/react @types/react-dom
# Add JSX support to vite.config.ts
# and start building React components!If you prefer to manually set up your project:
- Clone the repository:
git clone https://github.com/MrBrunoWolff/minimal-vite.git my-project
cd my-project- Remove git history and initialize a new repository:
rm -rf .git
git init
git add .
git commit -m "Initial commit"- Install dependencies:
bun install- Start building!
The template includes a pre-configured vite.config.ts with:
- Development server on port 3000 with auto-open browser
- Source maps for debugging
- Terser for optimal production builds
- Proper base path configuration
You can customize this configuration to fit your specific needs.
Contributions to improve this template are welcome!
- Fork the repository
- Create your feature branch:
git checkout -b my-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.