vite-plugin-vinext-zephyr
v0.1.13
Published
Vite plugin for deploying Vinext applications with Zephyr
Readme
vite-plugin-vinext-zephyr
Zephyr Cloud | Zephyr Docs | Discord | Twitter | LinkedIn
A Vite plugin for deploying Vinext applications with Zephyr Cloud.
Installation
pnpm add --save-dev vite-plugin-vinext-zephyrUsage
Add the plugin after vinext() in your vite.config.ts:
import { defineConfig } from 'vite';
import vinext from 'vinext';
import { cloudflare } from '@cloudflare/vite-plugin';
import { withZephyr } from 'vite-plugin-vinext-zephyr';
export default defineConfig({
plugins: [
vinext(),
cloudflare({
viteEnvironment: {
name: 'rsc',
childEnvironments: ['ssr'],
},
}),
withZephyr(),
],
});Options
withZephyr({
outputDir: 'dist',
entrypoint: 'server/index.js',
hooks: {},
});outputDir- Build output directory. Defaults todist.entrypoint- Optional server entrypoint relative to output directory. Auto-detected by default.hooks- Optional Zephyr deployment lifecycle hooks.
Entrypoint Auto-Detection
The plugin infers the entrypoint from Vite bundle hooks (writeBundle) without reading
the filesystem directly. When entrypoint is not provided, it resolves:
dist/server/index.jsfor App Router builds.dist/<worker-dir>/index.jswhen<worker-dir>containswrangler.jsonorwrangler.jsonc(Pages Router builds).
License
Apache-2.0
