Vite Plugin Vinext Zephyr

raw JSON →
1.0.2 verified Mon Apr 27 auth: no javascript

Vite plugin for deploying Vinext applications (Next.js-compatible framework built on Vite) to Zephyr Cloud. Currently at v1.0.2, with active development and patch releases every few weeks. Key differentiators: tightly integrated with Zephyr's deployment platform, handles build and upload of Vinext apps, supports ESM-only usage, and includes security fixes for dependency vulnerabilities. Alternative to manual deployment scripts or cloud-specific plugins.

error Cannot find module 'vite-plugin-vinext-zephyr' or its corresponding type declarations.
cause Package is ESM-only; CommonJS require or missing tsconfig settings.
fix
Ensure your project uses ESM (type: module in package.json) and TypeScript has moduleResolution set to 'bundler' or 'node16'.
error TypeError: Plugin configuration is invalid: plugins must be an array of Vite plugins.
cause Passing the plugin as a function call without instantiation (e.g., using vitePluginVinextZephyr instead of vitePluginVinextZephyr()).
fix
Use vitePluginVinextZephyr() (call the function) in the plugins array.
error Error: [Zephyr] API_KEY is required for authentication. Please provide via environment variable or options.
cause Missing ZEPHYR_API_KEY or options.apiKey.
fix
Set ZEPHYR_API_KEY environment variable or pass apiKey in plugin options.
gotcha The plugin requires Vite ^7.0.0 || ^8.0.0. Using older Vite versions will cause errors.
fix Update Vite to 7.x or 8.x.
breaking v1.0.0 introduced breaking changes from v0.x; see changelog for migration.
fix Review migration guide at https://github.com/ZephyrCloudIO/zephyr-packages/releases/tag/v1.0.0
deprecated Using default import may change in future; named export is preferred.
fix Use import { vitePluginVinextZephyr } from 'vite-plugin-vinext-zephyr'
gotcha The plugin's API relies on environment variables for authentication; missing env vars can lead to silent failures.
fix Explicitly pass options or set ZEPHYR_ORG_SLUG, ZEPHYR_PROJECT_SLUG, ZEPHYR_API_KEY before build.
npm install vite-plugin-vinext-zephyr
yarn add vite-plugin-vinext-zephyr
pnpm add vite-plugin-vinext-zephyr

Configures Vite with the Vinext Zephyr plugin using environment variables for authentication.

// vite.config.ts
import { vitePluginVinextZephyr } from 'vite-plugin-vinext-zephyr';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [
    vitePluginVinextZephyr({
      // Optional: Zephyr configuration
      // If not provided, uses environment variables
      orgSlug: process.env.ZEPHYR_ORG_SLUG ?? '',
      projectSlug: process.env.ZEPHYR_PROJECT_SLUG ?? '',
      apiKey: process.env.ZEPHYR_API_KEY ?? '',
    })
  ],
});

// Ensure environment variables are set before building:
// ZEPHYR_ORG_SLUG=my-org ZEPHYR_PROJECT_SLUG=my-project ZEPHYR_API_KEY=xxx npx vite build