Registry / devops / vite-plugin-dev-manifest

vite-plugin-dev-manifest

JSON →
library1.5.0jsnpmunverified

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.

npm install vite-plugin-dev-manifest
INSTALL
IMPORT
SIG · VITE-PLUGIN-DEV-MA
V
vite-plugin-dev-manifest
devopsjavascriptv1.5.0
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.

devManifest
import { devManifest } from 'vite-plugin-dev-manifest'
import devManifest from 'vite-plugin-dev-manifest'
Named export only; default export does not exist.
DevManifestOptions
import type { DevManifestOptions } from 'vite-plugin-dev-manifest'
Type import for TypeScript projects. Available since v1.0.0.
Plugin
import { devManifest } from 'vite-plugin-dev-manifest'; const manifestPlugin = devManifest();
const devManifest = require('vite-plugin-dev-manifest')
ESM-only; no CommonJS wrapper provided.
vite config
// vite.config.ts import { defineConfig } from 'vite' import { devManifest } from 'vite-plugin-dev-manifest' export default defineConfig({ plugins: [devManifest()] })
// wrong: passing options as positional argument instead of object import { devManifest } from 'vite-plugin-dev-manifest' export default defineConfig({ plugins: [devManifest({})] // correct usage is same but this is fine; wrong: missing parentheses })
Plugin must be instantiated in the plugins array.

Basic Vite config showing devManifest plugin usage with optional transform and custom base path

// vite.config.ts import { defineConfig } from 'vite' import { devManifest } from 'vite-plugin-dev-manifest' export default defineConfig({ plugins: [devManifest({ filename: 'manifest.json', base: '/wp-content/themes/mytheme/build/', transform(manifest) { return { ...manifest, customKey: 'value' } } })] })
Debug
Known issues
gotchaPlugin does not write manifest file for SSR builds; only client bundles generate manifest.
fix
Use the production manifest plugin for SSR entries.
affects: >=1.0.0
breakingOptions changed in v1.0.0; 'fileName' renamed to 'filename'.
fix
Use 'filename' instead of 'fileName'.
affects: <1.0.0
deprecatedOption 'outputDir' is deprecated and ignored; manifest is always placed in Vite's output directory.
fix
Remove 'outputDir' from options.
affects: >=1.2.0
gotchaRequires Vite>=2.7.0; older versions not supported.
fix
Upgrade Vite to 2.7+ or use legacy alternative.
affects: <2.7.0
Errors
Common errors & fixes
Cannot find module 'vite-plugin-dev-manifest' or its corresponding type declarations.
Missing installed package or TypeScript module resolution not set to 'node' or 'node16'.
fix
npm install vite-plugin-dev-manifest --save-dev; ensure tsconfig.json has 'moduleResolution': 'node' or 'nodenext'
Error: [vite-plugin-dev-manifest] The "path" argument must be of type string. Received undefined
Options object missing 'filename' key or passed undefined/null.
fix
Provide a filename string; e.g., devManifest({ filename: 'dev-manifest.json' })
TypeError: devManifest is not a function
Using default import instead of named import.
fix
Change to: import { devManifest } from 'vite-plugin-dev-manifest'
Upgrade
Version history
1.5.0latest on npm
Audit
Dependencies
viterequiredpeer dependency required for plugin functionality
Agent activity
2 hits · last 30 days
node
2
Resources