vite

Standardizes Vite 8 TypeScript builds with RolldownOptions, Oxc, and import.meta.env/glob configuration.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/jjmendezrodriguez/jm-claude-plugin --skill vite-jjmendezrodriguez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vite
Source: https://github.com/jjmendezrodriguez/jm-claude-plugin/tree/main/skills/vite
Command: npx skills add https://github.com/jjmendezrodriguez/jm-claude-plugin --skill vite-jjmendezrodriguez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves inconsistent and fragile Vite configuration that causes broken builds, missing env values, and SSR/import issues across environments.

Core Features & Use Cases

  • Lean, typed Vite config patterns: Use vite.config.ts with ESM, clean aliases, and documented infrastructure-level setup.
  • Environment & glob workflows: Use import.meta.env correctly (client-safe VITE_ vars) and power routing/code-loading with import.meta.glob.
  • Vite 8 Rolldown migration guidance: Translate rollupOptions to rolldownOptions and esbuild to oxc, keeping plugin behavior compatible.
  • SSR/build understanding: Apply library mode, multi-page build inputs, and low-level SSR primitives when you truly need them.

Quick Start

Configure your project by applying the staff-standard vite.config.ts approach, then verify env handling and build/preview output in Vite 8 with Rolldown migration guidance.

Frequently Asked Questions about vite

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate my Vite config from rollupOptions to rolldownOptions for Vite 8?

To migrate your Vite config to Vite 8 Rolldown, translate rollupOptions to rolldownOptions and replace esbuild with oxc while ensuring plugin behavior remains compatible. This standardizes build patterns and maintains consistent module loading for TypeScript projects.

Why does my Vite path alias fail to resolve in TypeScript?

Vite path alias resolution fails when tsconfig paths and Vite config aliases are misaligned. You must align tsconfig and Vite config aliases using an ESM-based defineConfig in vite.config.ts to ensure consistent module loading and fix broken builds.

What is the correct way to use import.meta.env for environment variables in Vite?

The correct way to use import.meta.env in Vite involves loading client-safe variables prefixed with VITE_ using import.meta.env or the loadEnv function appropriately. This prevents missing env values and ensures variables are safely exposed across environments.

How do I configure Vite SSR and multi-page build inputs correctly?

Configuring Vite SSR and multi-page build inputs correctly requires applying low-level SSR primitives, library mode, and explicit multi-page build inputs within vite.config.ts. This standardizes infrastructure-level setup and resolves SSR/import issues across environments.

Can I use import.meta.glob for dynamic routing and code-loading in Vite?

Yes, you can use import.meta.glob in Vite to power dynamic routing and code-loading workflows. This approach standardizes environment and glob workflows, allowing you to safely load multiple modules and manage complex code-splitting patterns.