Skip to content

We decided to release the [Environment API branch](https://github.com/vitejs/vite/pull/16471) as [email protected] (we'll continue regularly releasing new alpha patches). #20604

@Hepmar04

Description

@Hepmar04

We decided to release the Environment API branch as [email protected] (we'll continue regularly releasing new alpha patches).

The changes started by the [Runtime API]https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/(https://github.com/vitejs/vite/discussions/15774) are now prompting a complete review of the way Vite handles environments (client, SSR, workerd, etc). We were originally going to release this branch as [email protected] but the changes are now too big for a minor so we're going to start working on the next major directly with it. We're probably going to have ~2 months of alpha period and once we feel confident with the stability of the new APIs, we'll kick the beta.

If you are building a framework or are working in a Runtime (like the Cloudflare team), the next months are going to be very important to get the APIs right and serve as the base for the next iteration. We're thinking on lifting Vite's responsibilities to be able to share more in the ecosystem. For example, we're introducing the concept of a ViteBuilder that lets frameworks orchestrate all the environment builds they need to get a single vite build command to build the whole app. This means changing our stance on the "framework-as-a-plugin" pattern (SvelteKit, Remix, QwikCity, etc), and making it a first class pattern from Vite 6 forward.

Check out the current Environment API docs and give us feedback. This discussion is a good place to gather it, please share your impressions and PoCs as you test.

If you think someone you know would be interested in helping us testing and creating prototypes (Workerd framework-agnostic integrations, RSC, etc), please contact them so they can get involved.

Resources:

Previous discussions:

History:

Check out @antfu's Dev SSR on Nuxt post, explaining @pi0's Dev Bundler idea that led to the creation of vite-node. Anthony used vite-node to as the engine of Vitest. After revamping it, @sheremet-va added a revised version of vite-node in Vite Core in Vite 5.1. The Environment API is a new iteration, deeply integrating the features vite-node provided in Vite's API.

Originally posted by @patak-dev in #16358

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions