Vite Config Generator
Configure your Vite project options and instantly generate a ready-to-use vite.config.js or vite.config.ts file.
Configuration Options
No proxy rules — click "Add Rule" to add one.
vite.config.js
Copied!
Summary
Configure your Vite project options and instantly generate a ready-to-use vite.config.js or vite.config.ts file.
How it works
- Choose your target language: JavaScript (.js) or TypeScript (.ts).
- Select your framework to automatically include the correct Vite plugin.
- Set the base path (default "/"), build output directory, and dev server port.
- Add proxy rules by entering an API prefix and the target origin URL.
- Click "Generate Config" and copy the output to your project.
Use cases
- Quickly bootstrap a vite.config.ts for a new React + TypeScript project.
- Set up a proxied dev server so API calls skip CORS issues during development.
- Configure a non-root base path for apps deployed to a subdirectory.
- Generate a Vue or Svelte config without looking up plugin import syntax.
- Share a ready-made config snippet with teammates or in a Stack Overflow answer.
- Validate the correct Vite option names before editing your existing config.
Frequently Asked Questions
Last updated: 2026-06-09 ·
Reviewed by Nham Vu