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

  1. Choose your target language: JavaScript (.js) or TypeScript (.ts).
  2. Select your framework to automatically include the correct Vite plugin.
  3. Set the base path (default "/"), build output directory, and dev server port.
  4. Add proxy rules by entering an API prefix and the target origin URL.
  5. 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