@hiogawa/vite-node-miniflare
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

vite-node-miniflare

[!note] now it uses ViteRuntime instead of vite-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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @hiogawa/vite-node-miniflare

Weekly Downloads

6

Version

0.1.1

License

MIT

Unpacked Size

66.5 kB

Total Files

5

Last publish

Collaborators

  • hiogawa