# vite-plugin-dev-manifest

> Vite plugin for generating manifest during dev server

Latest version **1.5.0** (published 2026-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install vite-plugin-dev-manifest
pnpm add vite-plugin-dev-manifest
yarn add vite-plugin-dev-manifest
bun add vite-plugin-dev-manifest
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2026-03-19 |
| First published | 2022-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Miłosz Mandowski |
| Maintainers | f0rsaken |
| Keywords | vite-plugin, vite, wordpress, backend integration |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-dev-manifest
- Repository: https://github.com/owlsdepartment/vite-plugin-dev-manifest
- Homepage: https://github.com/owlsdepartment/vite-plugin-dev-manifest#readme
- Issues: https://github.com/owlsdepartment/vite-plugin-dev-manifest/issues
- npm.io page: https://npm.io/package/vite-plugin-dev-manifest

## 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

- 1.5.0 (latest) — 2026-03-19
- 1.4.1 — 2025-06-26
- 1.4.0 — 2024-12-04
- 1.3.1 — 2024-01-08
- 1.3.0 — 2023-12-18
- 1.2.0 — 2023-07-12
- 1.1.1 — 2023-01-09
- 1.1.0 — 2022-12-27
- 1.0.9 — 2022-08-20
- 1.0.8 — 2022-08-20
- 1.0.7 — 2022-06-24
- 1.0.6 — 2022-06-24
- 1.0.5 — 2022-06-19
- 1.0.4 — 2022-04-14
- 1.0.3 — 2022-01-24
- … 3 more at https://npm.io/package/vite-plugin-dev-manifest/versions

## README

# Vite Plugin Dev Manifest

Vite plugin for generating a dev version of manifest file for backend integration, so you can include script and styles without explicitly knowing what to include.

This way, you can run `vite` dev server and enjoy cool features, like HMR.

## Instalation

```bash
# yarn
yarn add -D vite-plugin-dev-manifest

# npm
npm install -D vite-plugin-dev-manifest
```

## Usage

Add it to your Vite config

```js
import { defineConfig } from 'vite';
import devManifest from 'vite-plugin-dev-manifest';

export default defineConfig({
    plugins: [
        devManifest(),
        // ...
    ],

    // ...

    build: {
        // required to create a manifest file
        manifest: true,

        rollupOptions: {
            // specify your input files here, as stated in Vite config https://vitejs.dev/config/#build-rollupoptions
            input: 'src/main.ts'
        }
    }
})
```

Manifest file will be generated in your `dist` folder, specified in Vite config. So with default settings it would be something like:

`{projectRoot}/dist/manifest.dev.json`

Generated manifest will have following structure:

```jsonc
{
    // url to base folder in your local dev server
    "url": "http://localhost:3000/",
    // inputs specified in 'build.rollupOptions.input'
	"inputs": {
		"main": "src/main.ts"
	}
}
```

It uses your final config to find root, base path and inputs. To retrieve input URL in dev environment, concat it's value with URL like this:

`{url}{inputs[input]}`

Based on our example, it would be: `http://localhost:3000/src/main.ts`

__NOTE:__ In manifest file, `inputs` field is always an object with a keys and values, even if `rollupOptions.input` is string or an array

## Plugin ordering

`vite-plugin-dev-manifest` forces itself to be registered in later stages, but if more plugins uses `enforce: post`, it may be needed to order this plugin as the last one, f. ex.: when using along [`vite-plugin-symfony`](https://github.com/lhapaipai/vite-plugin-symfony).

## Config

| Name | Type | Default | Description |
| -- | -- | -- | -- |
| `manifestName` | `string` | `manifest.dev` | name of the generated manifest file in dist folder |
| `omitInputs` | `string[]` | `[]` | inputs to omit in generated manifest. It is useful when you want to build some styles or scripts, but not include it in your front app |
| `delay` | `number` | `undefined` | you can delay creating of the manifest file if any of the plugins clears `dist` folder |
| `clearOnClose` | `boolean` | `true` | since version `1.2.0` manifest file is being removed, when dev server is closed. To prevent this behaviour, set this flag to `false` |

## Tips

We recommend using [vite-plugin-live-reload](https://github.com/arnoson/vite-plugin-live-reload) to reload site when editing your backend files. Don't worry tho, HMR still works for served assets.

## License

Library is under [MIT License](LICENSE)

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