Registry / devops / vite-uxp-plugin

vite-uxp-plugin

JSON →
library1.2.5jsnpmunverified

A Vite plugin for building Adobe UXP plugin panels. Version 1.2.5 is current. Provides seamless integration between Vite's fast development server and Adobe's UXP environment, enabling hot reload, CSS injection, and TypeScript support for UXP panels. Automatically handles UXP-specific module bundling and polyfills. Key differentiator: replaces the slow UXP Developer Tool workflow with Vite's instant HMR, making UXP panel development modern and efficient.

npm install vite-uxp-plugin
INSTALL
IMPORT
SIG · VITE-UXP-PLUGIN
V
vite-uxp-plugin
devopsjavascriptv1.2.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

viteUxpPlugin
import { viteUxpPlugin } from 'vite-uxp-plugin'
const viteUxpPlugin = require('vite-uxp-plugin')
ESM-only package; named export.
uxp
import { uxp } from 'vite-uxp-plugin'
import uxp from 'vite-uxp-plugin'
Named export for the UXP plugin instance.
PluginConfig
import type { PluginConfig } from 'vite-uxp-plugin'
import { PluginConfig } from 'vite-uxp-plugin'
TypeScript type, use `import type` for correct type-only import.

Configures Vite with the UXP plugin, specifying the manifest and enabling hot reload during development.

// vite.config.ts import { defineConfig } from 'vite'; import { viteUxpPlugin } from 'vite-uxp-plugin'; export default defineConfig({ plugins: [ viteUxpPlugin({ manifest: { id: 'com.example.plugin', name: 'My Plugin', version: '1.0.0', main: 'index.html', manifestVersion: 4 }, reload: true }) ] });
Debug
Known issues
gotchaManifest version must be 4 for UXP v7+; using manifestVersion: 3 breaks on newer UXP runtimes.
fix
Set manifestVersion: 4 in plugin options.
affects: >=1.0.0
breakingv1.x drop support for UXP v6; plugin only works with UXP v7+.
fix
Upgrade UXP Developer Tool to version 7+ or stay on v0.x.
affects: >=1.0.0
deprecatedThe `watch` option is deprecated; use `reload` instead.
fix
Replace `watch: true` with `reload: true`.
affects: >=1.2.0
gotchaCSS hot reload works only if styles are imported as JavaScript modules (e.g., import './style.css').
fix
Ensure CSS is imported via import statement, not via <link> tag.
affects: >=1.0.0
gotchaPlugin may fail to load if vite.config.ts has `build.lib` enabled; library mode is not supported.
fix
Remove `build.lib` config or use separate Vite configs for library and plugin.
affects: >=1.0.0
Errors
Common errors & fixes
Error: [vite-uxp-plugin] Manifest version must be a number and >= 3
manifestVersion option is missing or invalid.
fix
Add manifestVersion: 4 to plugin options in vite.config.ts.
ReferenceError: module is not defined
Node.js module.exports used in browser context; UXP plugins run in a Chromium-based environment.
fix
Use ES module syntax (import/export) instead of CommonJS (require/module.exports).
[vite-uxp-plugin] Failed to watch file changes: Error: EPERM: operation not permitted
File system permissions issue on Windows when saving files.
fix
Run terminal as Administrator or move project to a directory without restricted permissions (e.g., C:\Users\<name>\Projects).
TypeError: Cannot read properties of undefined (reading 'main')
Manifest object does not have a 'main' property or is undefined.
fix
Ensure manifest.main is defined (e.g., 'index.html').
Upgrade
Version history
1.2.5latest on npm
Audit
Dependencies
viterequiredpeer dependency; plugin runs as a Vite plugin
uxpoptionalprovides UXP API types and runtime polyfills
Agent activity
4 hits · last 30 days
node
4
Resources
vite-uxp-plugin — npm install vite-uxp-plugin · libregistry