Warning

The Vite Runtime API has been replaced with the new Vite Environment API, the experimentations here are therefore outdated, a followup of these using the new API can be found at https://github.com/dario-piotrowicz/vite-environment-6.0.0-alpha-experimentations.

Vite Runtime 5.1 experimentations

Experimentations based on the experimental Vite Runtime API introduced in Vite 5.1

Setup

Simply run:

$ pnpm i

to install all the dependencies and build all the packages in this repository

You can then go to:

examples/example-framework

and run

$ pnpm dev:node

to run the example using a vm Node.js based runtime

or

$ pnpm dev:workerd

to run the example using the Workerd runtime instead

Monorepo Structure

  • packages

    Basically contains plugins that using the Vite Runtime API allow to run code in Alternative JS Runtimes

  • examples

    Contains examples of usages of the above mentioned runtime packages

Note

All the packages and examples have their own README files briefly explaining the package/example

Credits & References