Skip to content

Latest commit

 

History

History
75 lines (56 loc) · 2.33 KB

File metadata and controls

75 lines (56 loc) · 2.33 KB

Vite Plugin Asset Manager Demo

vite-plugin-asset-manager

Stop grepping for image paths.
See exactly where every asset is used, find duplicates, and clean up what's unused.

Documentation · Issues · npm

Version Downloads License


Quick Start

pnpm add -D vite-plugin-asset-manager
// vite.config.ts
import { defineConfig } from 'vite'
import assetManager from 'vite-plugin-asset-manager'

export default defineConfig({
  plugins: [assetManager()],
})

Start your dev server, then press A or visit /__asset_manager__/.

Framework Support

Works automatically with Vue, React, Svelte, Solid, Lit, Preact, Qwik, and Vanilla Vite projects.

Official packages for SSR frameworks:

Framework Package Docs
Nuxt 3/4 @vite-asset-manager/nuxt Guide
Next.js 14+ nextjs-asset-manager Guide
TanStack Start Manual setup Guide

Configuration

assetManager({
  base: '/__asset_manager__',
  include: ['src', 'public'],
  exclude: ['node_modules', '.git', 'dist'],
  thumbnailSize: 200,
  floatingIcon: true,
  watch: true,
  launchEditor: 'code',
  aliases: { '@/': 'src/' },
})

All options are optional. See the full configuration reference.

License

MIT