# vite-plugin-inspect

> Inspect the intermediate state of Vite plugins

Latest version **12.0.2** (published 2026-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install vite-plugin-inspect
pnpm add vite-plugin-inspect
yarn add vite-plugin-inspect
bun add vite-plugin-inspect
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 12.0.2 |
| Published | 2026-07-13 |
| First published | 2021-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 9 |
| Unpacked size | 3.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1698 |
| Author | Anthony Fu <anthonyfu117@hotmail.com> |
| Maintainers | antfu, sxzz |
| Keywords | vite-plugin |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-inspect
- Repository: https://github.com/antfu-collective/vite-plugin-inspect
- Homepage: https://github.com/antfu-collective/vite-plugin-inspect#readme
- Issues: https://github.com/antfu-collective/vite-plugin-inspect/issues
- Funding: https://github.com/sponsors/antfu
- npm.io page: https://npm.io/package/vite-plugin-inspect

## Dependencies (9)

- [obug](https://npm.io/package/obug.md) ^2.1.3
- [open](https://npm.io/package/open.md) ^11.0.0
- [sirv](https://npm.io/package/sirv.md) ^3.0.2
- [ansis](https://npm.io/package/ansis.md) ^4.3.1
- [ohash](https://npm.io/package/ohash.md) ^2.0.11
- [unplugin-utils](https://npm.io/package/unplugin-utils.md) ^0.3.2
- [perfect-debounce](https://npm.io/package/perfect-debounce.md) ^2.1.0
- [@vitejs/devtools-kit](https://npm.io/package/@vitejs/devtools-kit.md) ^0.4.0
- [error-stack-parser-es](https://npm.io/package/error-stack-parser-es.md) ^2.0.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 12.0.2 (latest) — 2026-07-13
- 0.10.0 (next) — 2024-11-27
- 11.4.1 — 2026-05-29
- 12.0.0-beta.3 — 2026-05-29
- 12.0.0-beta.2 — 2026-05-15
- 12.0.0-beta.1 — 2026-03-24
- 11.3.3 — 2025-08-25
- 11.3.2 — 2025-07-27
- 11.3.0 — 2025-06-29
- 11.2.0 — 2025-06-15
- 11.1.0 — 2025-05-20
- 11.0.1 — 2025-04-18
- 11.0.0 — 2025-02-22
- 10.3.0 — 2025-02-22
- 10.2.1 — 2025-02-14
- … 98 more at https://npm.io/package/vite-plugin-inspect/versions

## README

# vite-plugin-inspect

[![NPM version](https://img.shields.io/npm/v/vite-plugin-inspect?color=a1b858&label=)](https://www.npmjs.com/package/vite-plugin-inspect)

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

<img width="1488" alt="Screenshot 2024-11-27 at 19 01 26" src="https://github.com/user-attachments/assets/ab6b86ac-d7ce-4424-a23f-02f265f547ea">

## Install

> [!NOTE]
>
> v12.x requires **Vite v8.0.0** or above with **@vitejs/devtools v0.4.0** or above.
>
> For the previous versions, check the [v11](https://github.com/antfu-collective/vite-plugin-inspect/tree/v11) branch.

```bash
pnpm add -D vite-plugin-inspect @vitejs/devtools
```

Add plugin to your `vite.config.ts`:

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

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

Then run `npm run dev` and open the DevTools to inspect the modules.

## Build Mode

To inspect transformation in build mode, you can set the `devtools.build.withApp` option to `true`:

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

export default {
  devtools: {
    build: {
      withApp: true,
    }
  },
  plugins: [
    Inspect({
      build: true
    })
  ],
}
```

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

<p align="center">
  <a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
    <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg' alt='Sponsors' />
  </a>
</p>

## License

[MIT](./LICENSE) License &copy; 2021-PRESENT [Anthony Fu](https://github.com/antfu)

---
_Source: https://npm.io/package/vite-plugin-inspect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
