vite-config

Generates vite.config.ts for building and serving the Vue 3 application. Configures dev server, API proxy, build format, and plugins.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 30, 2025⬇️1downloads

When & Why to Use This Skill

This Claude skill automates the generation of a production-ready `vite.config.ts` file specifically optimized for Vue 3 applications. It eliminates manual configuration errors by streamlining the setup of development servers, API proxies, and build formats. By integrating best practices for CSS injection and SVG handling, it ensures your project is correctly configured for both standard deployments and complex micro-frontend architectures like single-spa.

Use Cases

  • Rapid Project Setup: Instantly generate a standardized Vite configuration when initializing new Vue 3 projects to ensure consistent environment settings.
  • API Proxy Configuration: Seamlessly bridge frontend and backend services by automatically setting up proxy rules to handle local development and CORS requirements.
  • Micro-frontend Optimization: Configure specialized build outputs (SystemJS/ESM) and JavaScript-based CSS injection required for single-spa compatibility.
  • Asset Pipeline Management: Implement pre-configured SVG loaders and plugin chains to ensure assets are processed correctly for high-performance web applications.
namevite-config
descriptionGenerates vite.config.ts for building and serving the Vue 3 application. Configures dev server, API proxy, build format, and plugins.

Vite Config Skill

Purpose

Generate the vite.config.ts file for building and serving the Vue 3 application.

Input Parameters

Read from copilot-instructions.md and docs/requirements/application-parameters.md:

  • application_id: The application ID for style tag
  • default_port: The development server port
  • api_base_path: The base path for API proxy
  • vite_build_format: The build output format (system or es)

Output

Create the file: vite.config.ts

Template

See: examples.md in this directory for complete template and detailed examples.

Notes

  • The proxy configuration should be updated with the actual backend service URL
  • The appId is imported from the global constants file
  • CSS is injected by JavaScript in build mode for single-spa compatibility
  • SVG loader is configured to preserve viewBox for proper scaling