Vite CEP Plugin

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

A Vite plugin for bundling Adobe CEP (Common Extensibility Platform) Extension panels. Current stable version is 2.2.0, released with regular updates. It integrates Vite's fast development server and build pipeline into Adobe CEP workflows, supporting TypeScript, React, Vue, and Svelte out of the box. Unlike older workflows using Webpack or manual scripts, this plugin provides HMR, CSS modules, and optimized builds. Intended to be used with the Bolt CEP boilerplate but works standalone. It is ESM-only, requires CEP 8+ (CC 2018+), and automatically handles manifest generation and zipping for distribution.

error Error: Cannot find module 'vite-cep-plugin'
cause Package not installed or installed in wrong directory.
fix
Run 'yarn add vite-cep-plugin' or 'npm install vite-cep-plugin' in your project root.
error TypeError: viteCEP is not a function
cause Using require() instead of import. vite-cep-plugin is ESM-only since v2.
fix
Change 'const viteCEP = require("vite-cep-plugin")' to 'import viteCEP from "vite-cep-plugin"'.
error ERROR: Plugin 'vite-cep-plugin' requires Vite >=2.0
cause Installed vite-cep-plugin v2 with an older Vite version.
fix
Update Vite to v2 or higher: 'npm update vite'.
breaking Breaking change in v2: Plugin no longer supports CommonJS require. Use ESM imports only.
fix Switch from require() to import statements in vite.config.js and all source files.
breaking v2 drops support for Vite 1.0. Minimum Vite version is now 2.0.
fix Update Vite to v2 or higher.
deprecated The 'manifest' option in plugin config is deprecated in favor of 'cep' option.
fix Use { cep: { manifest: { ... } } } instead of { manifest: { ... } }.
gotcha Hot Module Replacement (HMR) does not work correctly when multiple panels are open. Refresh the panel manually.
fix No fix; design limitation. Use manual refresh when developing with multiple panels.
npm install vite-cep-plugin
yarn add vite-cep-plugin
pnpm add vite-cep-plugin

Configures Vite with vite-cep-plugin, setting output directory and entry point for an Adobe CEP extension.

// vite.config.js
import { defineConfig } from 'vite';
import viteCEP from 'vite-cep-plugin';

export default defineConfig({
  plugins: [viteCEP()],
  build: {
    outDir: 'dist/extension',
    rollupOptions: {
      input: 'src/index.html'
    }
  }
});