vite-core-environment-api

Configure per-environment settings for Vite 6 Environment API.

4|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/OpenAEC-Workspace-Composer --skill vite-core-environment-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vite-core-environment-api
Source: https://github.com/OpenAEC-Foundation/OpenAEC-Workspace-Composer/tree/main/.claude/skills/vite/vite-core/vite-core-environment-api
Command: npx skills add https://github.com/OpenAEC-Foundation/OpenAEC-Workspace-Composer --skill vite-core-environment-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Vite 6 introduces explicit environments; this skill helps configure per-environment settings to prevent using outdated Vite 5 patterns and misconfigurations.

Core Features & Use Cases

  • Provide explicit per-environment configuration to manage client, server, and edge environments with inheritance and overrides.
  • Support provider-based environments and migration guidance from Vite 5 implicit environments to Vite 6 explicit environments.
  • Ensure correct use of EnvironmentOptions fields like define, resolve, consumer, dev, and build to maintain compatibility and prevent runtime errors.

Quick Start

Create a vite.config.js that defines a server environment with consumer: 'server' and a distinct build.outDir, then run the dev server to verify environment separation.

Frequently Asked Questions about vite-core-environment-api

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

FAQPage Schema
How do I migrate Vite 5 implicit environments to Vite 6 explicit environments?

Migrate Vite 5 implicit environments to Vite 6 by configuring explicit per-environment settings. This workflow provides inheritance from top-level options with per-environment overrides for client, server, and edge runtimes to prevent misconfiguration.

What are Vite 6 EnvironmentOptions for managing multi-environment SSR and edge builds?

Vite 6 EnvironmentOptions manage multi-environment builds by providing specific fields like define, resolve, consumer, dev, and build. These fields ensure correct configuration separation for client, server, and edge runtimes to prevent runtime errors.

How to configure provider-based environments in Vite 6?

Configure provider-based environments in Vite 6 by defining explicit per-environment settings with inheritance and overrides. Set a server environment using consumer: 'server' and a distinct build.outDir to verify environment separation.

Can I use Vite 5 patterns for server and edge runtimes in Vite 6?

You should not use Vite 5 patterns for server and edge runtimes in Vite 6. Vite 6 introduces explicit environments to replace outdated implicit patterns, requiring explicit per-environment configuration to maintain compatibility and prevent runtime errors.

How do I separate client and server environments in Vite 6?

Separate client and server environments in Vite 6 by defining a vite.config.js with explicit consumer: 'server' settings and a distinct build.outDir. Run the dev server to verify environment separation and ensure correct per-environment overrides.

Why does my Vite 6 multi-environment build fail with misconfiguration errors?

Vite 6 multi-environment builds fail when using outdated Vite 5 implicit patterns instead of explicit per-environment settings. Apply correct EnvironmentOptions like define, resolve, consumer, dev, and build to maintain runtime compatibility and prevent errors.