{"id":22937,"library":"vite-plugin-zephyr","title":"Zephyr Vite Plugin","description":"Vite plugin (v1.0.2) for integrating Zephyr Cloud's module federation and deployment platform into Vite-based projects. Enables seamless federated module loading, deployment to Zephyr Cloud, and version management. Requires Vite ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0, Rollup ^4.0.0, and @module-federation/vite ^1.13.2. Ships TypeScript types. Key differentiators: purpose-built for Zephyr Cloud with no-config setup and automatic module synchronization. Release cadence: patch releases every few weeks with occasional major bumps.","status":"active","version":"1.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/ZephyrCloudIO/zephyr-packages","tags":["javascript","vite-plugin","vite","module-federation","zephyr","deploy","typescript"],"install":[{"cmd":"npm install vite-plugin-zephyr","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-zephyr","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-zephyr","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, plugin runs inside Vite's build pipeline","package":"vite","optional":false},{"reason":"peer dependency, Vite uses Rollup under the hood","package":"rollup","optional":false},{"reason":"peer dependency, core library for module federation integration","package":"@module-federation/vite","optional":false}],"imports":[{"note":"ESM-only; CJS require() will fail. Use import syntax.","wrong":"const zephyr = require('vite-plugin-zephyr')","symbol":"default (plugin)","correct":"import zephyr from 'vite-plugin-zephyr'"},{"note":"TypeScript only; no runtime value.","symbol":"ZephyrPluginOptions","correct":"import type { ZephyrPluginOptions } from 'vite-plugin-zephyr'"},{"note":"Exported as named export from the main package, not a subpath.","wrong":"import withZephyr from 'vite-plugin-zephyr/withZephyr'","symbol":"withZephyr","correct":"import { withZephyr } from 'vite-plugin-zephyr'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport zephyr from 'vite-plugin-zephyr';\n\nexport default defineConfig({\n  plugins: [\n    zephyr({\n      // Optional: specify Zephyr project URL or API key\n      projectUrl: process.env.ZEPHYR_PROJECT_URL ?? '',\n      apiKey: process.env.ZEPHYR_API_KEY ?? '',\n      // Enable hot reload for federated modules\n      hotReload: true\n    })\n  ]\n});","lang":"typescript","description":"Basic Vite config with Zephyr plugin enabling module federation and deployment integration."},"warnings":[{"fix":"Replace `import { withZephyr } from 'vite-plugin-zephyr'` with `import zephyr from 'vite-plugin-zephyr'`.","message":"The 'withZephyr' helper has been deprecated in v1.0.0. Use the default import directly.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Order plugins correctly: `plugins: [vue(), react(), zephyr()]`.","message":"Plugin must be placed AFTER the Vue or React plugin in the plugins array to ensure correct processing.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use `zephyr()` as a function call, not `new zephyr()` or just `zephyr`.","message":"v1.0.0 changed the default export from an object to a function. Direct plugin registration without calling the function will fail.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Install compatible version: `npm install @module-federation/vite@^1.13.2`.","message":"The plugin requires @module-federation/vite version ^1.13.2. Older or newer major versions may cause incompatibility.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Change to `import zephyr from 'vite-plugin-zephyr'` and ensure package.json has `\"type\": \"module\"`.","cause":"CJS require() used instead of ESM import.","error":"Cannot find module 'vite-plugin-zephyr'"},{"fix":"Use `zephyr()` instead of `zephyr` in the plugins array.","cause":"Using the default export incorrectly without calling it as a function.","error":"ERR_PNPM_RECURSIVE_RUN\n ERR   vite-plugin-zephyr is not a valid plugin option. Expected a function, got an object."},{"fix":"Run `npm install @module-federation/vite@^1.13.2` to install the correct peer dependency.","cause":"Incompatible version of @module-federation/vite installed.","error":"Module federation build failed: @module-federation/vite version mismatch"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}