{"id":22638,"library":"vite-plugin-dev-manifest","title":"vite-plugin-dev-manifest","description":"Vite plugin that generates a manifest.json file during development, enabling backend integrations (e.g., WordPress) to consume the same generated manifest used in production builds. v1.5.0 supports Vite 2.7 through 8.x. Unlike the standard manifest plugin, this runs in dev mode without building, injecting current scripts and styles. Ships TypeScript types.","status":"active","version":"1.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/owlsdepartment/vite-plugin-dev-manifest","tags":["javascript","vite-plugin","vite","wordpress","backend integration","typescript"],"install":[{"cmd":"npm install vite-plugin-dev-manifest","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-dev-manifest","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-dev-manifest","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin functionality","package":"vite","optional":false}],"imports":[{"note":"Named export only; default export does not exist.","wrong":"import devManifest from 'vite-plugin-dev-manifest'","symbol":"devManifest","correct":"import { devManifest } from 'vite-plugin-dev-manifest'"},{"note":"Type import for TypeScript projects. Available since v1.0.0.","wrong":"","symbol":"DevManifestOptions","correct":"import type { DevManifestOptions } from 'vite-plugin-dev-manifest'"},{"note":"ESM-only; no CommonJS wrapper provided.","wrong":"const devManifest = require('vite-plugin-dev-manifest')","symbol":"Plugin","correct":"import { devManifest } from 'vite-plugin-dev-manifest'; const manifestPlugin = devManifest();"},{"note":"Plugin must be instantiated in the plugins array.","wrong":"// wrong: passing options as positional argument instead of object\nimport { devManifest } from 'vite-plugin-dev-manifest'\nexport default defineConfig({\n  plugins: [devManifest({})]  // correct usage is same but this is fine; wrong: missing parentheses\n})","symbol":"vite config","correct":"// vite.config.ts\nimport { defineConfig } from 'vite'\nimport { devManifest } from 'vite-plugin-dev-manifest'\n\nexport default defineConfig({\n  plugins: [devManifest()]\n})"}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite'\nimport { devManifest } from 'vite-plugin-dev-manifest'\n\nexport default defineConfig({\n  plugins: [devManifest({\n    filename: 'manifest.json',\n    base: '/wp-content/themes/mytheme/build/',\n    transform(manifest) {\n      return {\n        ...manifest,\n        customKey: 'value'\n      }\n    }\n  })]\n})","lang":"typescript","description":"Basic Vite config showing devManifest plugin usage with optional transform and custom base path"},"warnings":[{"fix":"Use the production manifest plugin for SSR entries.","message":"Plugin does not write manifest file for SSR builds; only client bundles generate manifest.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use 'filename' instead of 'fileName'.","message":"Options changed in v1.0.0; 'fileName' renamed to 'filename'.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Remove 'outputDir' from options.","message":"Option 'outputDir' is deprecated and ignored; manifest is always placed in Vite's output directory.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Upgrade Vite to 2.7+ or use legacy alternative.","message":"Requires Vite>=2.7.0; older versions not supported.","severity":"gotcha","affected_versions":"<2.7.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install vite-plugin-dev-manifest --save-dev; ensure tsconfig.json has 'moduleResolution': 'node' or 'nodenext'","cause":"Missing installed package or TypeScript module resolution not set to 'node' or 'node16'.","error":"Cannot find module 'vite-plugin-dev-manifest' or its corresponding type declarations."},{"fix":"Provide a filename string; e.g., devManifest({ filename: 'dev-manifest.json' })","cause":"Options object missing 'filename' key or passed undefined/null.","error":"Error: [vite-plugin-dev-manifest] The \"path\" argument must be of type string. Received undefined"},{"fix":"Change to: import { devManifest } from 'vite-plugin-dev-manifest'","cause":"Using default import instead of named import.","error":"TypeError: devManifest is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}