0.1.1 • Published 1 month ago
@hiogawa/vite-node-miniflare v0.1.1
vite-node-miniflare
!note now it uses
ViteRuntime
instead ofvite-node
Running vite-node
on miniflare
.
See https://github.com/dario-piotrowicz/vite-workerd-ssr-request-handler-experimentation/pull/1 for the motivation.
See https://github.com/hi-ogawa/vite-plugins/issues/127 for known limitations.
examples
vite-runtime-workerd-examples
: example repository with Cloudflare Pages deployment./examples/basic
: Simple demo of SSR, Hydration and HMR with@hiogawa/tiny-react
./examples/react
: Simple demo with React./examples/react-router
: React Router SSR application with@hiogawa/vite-glob-routes
./examples/remix
: Remix Vite Plugin integration
usage
//
// vite.config.ts
//
import { defineConfig } from "vite";
import { vitePluginViteNodeMiniflare } from "@hiogawa/vite-node-miniflare";
export default defineConfig({
plugins: [vitePluginViteNodeMiniflare({ entry: "/worker-entry.ts" })],
});
//
// worker-entry.ts
//
export default {
async fetch() {
return new Response("hello workerd");
},
};
credits/references
- https://github.com/dario-piotrowicz/vite-workerd-ssr-request-handler-experimentation
- https://github.com/vitest-dev/vitest/tree/main/packages/vite-node
- https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare
- https://github.com/nuxt/nuxt/blob/1de44a5a5ca5757d53a8b52c9809cbc027d2d246/packages/vite/src/vite-node.ts
- https://github.com/sapphi-red/vite-envs/tree/use-vite-runtime
- https://github.com/vitejs/vite/discussions/14288
0.1.1
1 month ago
0.1.0
1 month ago
0.0.3-pre.3
3 months ago
0.0.3-pre.2
3 months ago
0.0.3-pre.1
3 months ago
0.0.3-pre.0
3 months ago
0.0.0-pre.13
3 months ago
0.0.1
3 months ago
0.0.2
3 months ago
0.0.0-pre.12
5 months ago
0.0.0-pre.10
5 months ago
0.0.0-pre.11
5 months ago
0.0.0-pre.9
5 months ago
0.0.0-pre.8
5 months ago
0.0.0-pre.6
5 months ago
0.0.0-pre.7
5 months ago
0.0.0-pre.5
5 months ago
0.0.0-pre.2
5 months ago
0.0.0-pre.3
5 months ago
0.0.0-pre.4
5 months ago
0.0.0-pre.1
5 months ago
0.0.0-pre.0
5 months ago