crates/rolldown_plugin_vite_manifest/README.md
A plugin for rolldown-vite that generates a manifest.json mapping original filenames to emitted assets/chunks, ported from Vite's manifestPlugin.
This plugin is exclusive to rolldown-vite and is not recommended for external use.
This plugin collects all emitted chunks and assets, associates them with their original names, and outputs a manifest JSON. Useful for server-side rendering or asset injection.
import { defineConfig } from 'rolldown';
import { viteManifestPlugin } from 'rolldown/experimental';
export default defineConfig({
input: {
entry: './main.ts',
},
plugins: [
viteManifestPlugin({
root: path.resolve(import.meta.dirname),
outPath: path.resolve(import.meta.dirname, 'dist/manifest.json'),
}),
],
});
| Option | Type | Description |
|---|---|---|
root | string | Project root directory |
outPath | string | Where to write the manifest output file |