{"id":22956,"library":"vite-uxp-plugin","title":"Vite UXP Plugin","description":"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.","status":"active","version":"1.2.5","language":"javascript","source_language":"en","source_url":"https://github.com/hyperbrew/bolt-uxp","tags":["javascript"],"install":[{"cmd":"npm install vite-uxp-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add vite-uxp-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-uxp-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin runs as a Vite plugin","package":"vite","optional":false},{"reason":"provides UXP API types and runtime polyfills","package":"uxp","optional":true}],"imports":[{"note":"ESM-only package; named export.","wrong":"const viteUxpPlugin = require('vite-uxp-plugin')","symbol":"viteUxpPlugin","correct":"import { viteUxpPlugin } from 'vite-uxp-plugin'"},{"note":"Named export for the UXP plugin instance.","wrong":"import uxp from 'vite-uxp-plugin'","symbol":"uxp","correct":"import { uxp } from 'vite-uxp-plugin'"},{"note":"TypeScript type, use `import type` for correct type-only import.","wrong":"import { PluginConfig } from 'vite-uxp-plugin'","symbol":"PluginConfig","correct":"import type { PluginConfig } from 'vite-uxp-plugin'"}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite';\nimport { viteUxpPlugin } from 'vite-uxp-plugin';\n\nexport default defineConfig({\n  plugins: [\n    viteUxpPlugin({\n      manifest: {\n        id: 'com.example.plugin',\n        name: 'My Plugin',\n        version: '1.0.0',\n        main: 'index.html',\n        manifestVersion: 4\n      },\n      reload: true\n    })\n  ]\n});","lang":"typescript","description":"Configures Vite with the UXP plugin, specifying the manifest and enabling hot reload during development."},"warnings":[{"fix":"Set manifestVersion: 4 in plugin options.","message":"Manifest version must be 4 for UXP v7+; using manifestVersion: 3 breaks on newer UXP runtimes.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade UXP Developer Tool to version 7+ or stay on v0.x.","message":"v1.x drop support for UXP v6; plugin only works with UXP v7+.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Replace `watch: true` with `reload: true`.","message":"The `watch` option is deprecated; use `reload` instead.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Ensure CSS is imported via import statement, not via <link> tag.","message":"CSS hot reload works only if styles are imported as JavaScript modules (e.g., import './style.css').","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Remove `build.lib` config or use separate Vite configs for library and plugin.","message":"Plugin may fail to load if vite.config.ts has `build.lib` enabled; library mode is not supported.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Add manifestVersion: 4 to plugin options in vite.config.ts.","cause":"manifestVersion option is missing or invalid.","error":"Error: [vite-uxp-plugin] Manifest version must be a number and >= 3"},{"fix":"Use ES module syntax (import/export) instead of CommonJS (require/module.exports).","cause":"Node.js module.exports used in browser context; UXP plugins run in a Chromium-based environment.","error":"ReferenceError: module is not defined"},{"fix":"Run terminal as Administrator or move project to a directory without restricted permissions (e.g., C:\\Users\\<name>\\Projects).","cause":"File system permissions issue on Windows when saving files.","error":"[vite-uxp-plugin] Failed to watch file changes: Error: EPERM: operation not permitted"},{"fix":"Ensure manifest.main is defined (e.g., 'index.html').","cause":"Manifest object does not have a 'main' property or is undefined.","error":"TypeError: Cannot read properties of undefined (reading 'main')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}