MCPcopy Index your code
hub / github.com/antfu-collective/vite-plugin-inspect

github.com/antfu-collective/vite-plugin-inspect @v11.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v11.4.1 ↗ · + Follow
116 symbols 253 edges 40 files 0 documented · 0% 38 cross-repo links updated 21d agov11.4.1 · 2026-05-29★ 1,68710 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

vite-plugin-inspect

NPM version

Inspect the intermediate state of Vite plugins. Useful for debugging and authoring plugins.

Screenshot 2024-11-27 at 19 01 26

Install

npm i -D vite-plugin-inspect

[!NOTE]

v10.x requires Vite v6.0.1 or above.

For Vite v2 to v5, use v0.8.x of vite-plugin-inspect. If you want to use it with both Vite 6 and below, you can still use v0.8.x, it's forwards compatible.

Add plugin to your vite.config.ts:

// vite.config.ts
import Inspect from 'vite-plugin-inspect'

export default {
  plugins: [
    Inspect()
  ],
}

Then run npm run dev and visit localhost:5173/__inspect/ to inspect the modules.

Build Mode

To inspect transformation in build mode, you can pass the build: true option:

// vite.config.ts
import Inspect from 'vite-plugin-inspect'

export default {
  plugins: [
    Inspect({
      build: true,
      outputDir: '.vite-inspect'
    })
  ],
}

After running vite build, the inspector client will be generated under .vite-inspect, where you can use npx serve .vite-inspect to check the result.

Sponsors

Sponsors

License

MIT License © 2021-PRESENT Anthony Fu

Extension points exported contracts — how you extend this code

SplitpaneProps (Interface)
(no doc)
splitpanes.d.ts
TransformInfo (Interface)
(no doc)
src/types.ts
GlobalComponents (Interface)
(no doc)
src/client/components.d.ts
ViteInspectAPI (Interface)
(no doc)
src/node/index.ts
PaneProps (Interface)
(no doc)
splitpanes.d.ts
ResolveIdInfo (Interface)
(no doc)
src/types.ts
RouteNamedMap (Interface)
(no doc)
src/client/typed-router.d.ts
ViteInspectOptions (Interface)
(no doc)
src/node/options.ts

Core symbols most depended-on inside this repo

getEnvContext
called by 7
src/node/context.ts
getViteContext
called by 5
src/node/context.ts
fetchJson
called by 4
src/client/logic/rpc-static.ts
syncEditorScrolls
called by 4
src/client/logic/codemirror.ts
getMetadata
called by 4
src/node/context.ts
queryEnv
called by 4
src/node/context.ts
normalizeId
called by 4
src/node/context.ts
writeJSON
called by 4
src/node/build.ts

Shape

Function 64
Interface 24
Method 22
Class 6

Languages

TypeScript100%

Modules by API surface

src/node/context.ts28 symbols
src/types.ts14 symbols
src/node/index.ts13 symbols
src/node/rpc.ts8 symbols
src/node/build.ts8 symbols
src/client/logic/utils.ts5 symbols
src/node/hijack.ts4 symbols
src/client/stores/options.ts4 symbols
src/node/utils.ts3 symbols
src/client/vite.config.ts3 symbols
src/client/stores/payload.ts3 symbols
src/client/logic/rpc-static.ts3 symbols

For agents

$ claude mcp add vite-plugin-inspect \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page