Registry / devops / vite-plugin-asset-manager

vite-plugin-asset-manager

JSON →
library1.0.6jsnpmunverified

A Vite plugin providing a visual asset management interface during development. Scans and catalogs images, videos, audio, fonts, documents, and data files; shows import locations, detects duplicates via MD5 hashing, and allows filtering by size/type/date. Includes a draggable floating panel, keyboard shortcuts (Alt+Shift+A), real-time updates via SSE, and bulk operations (download ZIP, copy paths, delete). Ships TypeScript types. Current version 1.0.6 (March 2025). Requires Vite >=5.0.0 and Node >=22. Peer dependency on vite (not bundled). Regular releases; actively maintained.

npm install vite-plugin-asset-manager
INSTALL
IMPORT
SIG · VITE-PLUGIN-ASSET-
V
vite-plugin-asset-manager
devopsjavascriptv1.0.6
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.

AssetManager
import AssetManager from 'vite-plugin-asset-manager'
const AssetManager = require('vite-plugin-asset-manager')
Default export. ESM only (package type module). CJS require will fail.
type AssetManagerOptions
import type { AssetManagerOptions } from 'vite-plugin-asset-manager'
Type import available; Options type exported from package.
withAssetManager
import { withAssetManager } from 'vite-plugin-asset-manager/next'
import { withAssetManager } from 'vite-plugin-asset-manager'
Next.js wrapper exported from subpath; using main export will error.

Registers the AssetManager plugin in vite.config.ts with optional configuration for prefix, auto-inject, and exclusion patterns.

// vite.config.ts import { defineConfig } from 'vite' import AssetManager from 'vite-plugin-asset-manager' export default defineConfig({ plugins: [ AssetManager({ // Optional: customize prefix or disable auto-inject prefix: '/__assets__', autoInject: true, // Ignore certain file patterns exclude: ['**/*.map'] }) ], }) // Access UI at /__asset_manager__/ or press Alt+Shift+A
Debug
Known issues
breakingRequires Node >=22 and Vite >=5.0.0. Older Node versions will fail to start.
fix
Update Node to v22+ and Vite to v5+.
affects: >=1.0.0
gotchaThe plugin injects a floating icon into your development HTML. It is not removed in production builds.
fix
In production, the plugin logic is stripped (Vite dev-only), but ensure you don't depend on the UI outside dev mode.
affects: >=0.0.1
gotchaAsset scanning uses file system watchers; might cause high CPU on projects with thousands of assets. Use `exclude` option to ignore unnecessary directories.
fix
Add exclude patterns for node_modules, build output, etc.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'vite-plugin-asset-manager'
Package not installed or CJS require used instead of ESM import.
fix
Run `npm install vite-plugin-asset-manager -D` and use `import AssetManager from 'vite-plugin-asset-manager'`.
TypeError: AssetManager is not a function
Default import not used; likely destructured incorrectly.
fix
Use `import AssetManager from 'vite-plugin-asset-manager'` (default export) not `import { AssetManager }`.
Uncaught Error: Vite plugin 'vite-plugin-asset-manager' requires Vite >=5.0.0
Project uses an older Vite version.
fix
Update Vite to version 5 or newer.
[vite] Internal server error: Cannot find module 'vite-plugin-asset-manager/next'
Attempting to use Next.js integration without installing the correct subpath or from a non-Next.js project.
fix
Ensure you have the package installed and only import `withAssetManager` from `'vite-plugin-asset-manager/next'` inside a Next.js configuration file.
Upgrade
Version history
1.0.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
vite-plugin-asset-manager — npm install vite-plugin-asset-manager · libregistry