Back to Rolldown

Maintenance Guide

crates/rolldown_plugin_vite_manifest/README.md

0.15.11.2 KB
Original Source

Maintenance Guide

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.

📦 What it does

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.

🚀 Debug Usage

js
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'),
    }),
  ],
});

⚙️ Options

OptionTypeDescription
rootstringProject root directory
outPathstringWhere to write the manifest output file