Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dario-piotrowicz/vite-runtime-5.1-experimentations
https://github.com/dario-piotrowicz/vite-runtime-5.1-experimentations
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dario-piotrowicz/vite-runtime-5.1-experimentations
- Owner: dario-piotrowicz
- Created: 2024-02-21T10:14:55.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-26T12:13:52.000Z (7 months ago)
- Last Synced: 2024-04-26T13:32:43.737Z (7 months ago)
- Language: TypeScript
- Size: 637 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> [!WARNING]
> The Vite Runtime API has been replaced with the new [Vite Environment API](https://deploy-preview-16471--vite-docs-main.netlify.app/guide/api-vite-environment.html), 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](https://vitejs.dev/guide/api-vite-runtime) introduced in Vite 5.1
## Setup
Simply run:
```sh
$ 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
```sh
$ pnpm dev:node
```to run the example using a vm Node.js based runtime
or
```sh
$ 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
- [**vite-node-miniflare** (by _hi-ogawa_)](https://github.com/hi-ogawa/vite-plugins/blob/ba5d995046cffc0fd368dd3c3a4d05f9d2db29dc/packages/vite-node-miniflare)
- [**vite-envs** (by _sapphi-red_)](https://github.com/sapphi-red/vite-envs/tree/7f76892b7d28f0da06826f43953cedb5b2f042c5)
- [**hydrogen vite** (by _frandiox_)](https://github.com/Shopify/hydrogen/pull/1728)