UNPKG

dinou

Version:

Dinou is a modern React 19 framework with React Server Components, Server Functions, and streaming SSR.

26 lines (21 loc) 648 B
let manifestData = {}; function manifestGeneratorPlugin() { return { name: "manifest-generator", generateBundle(options, bundle) { for (const [fileName, info] of Object.entries(bundle)) { if (info.type === "chunk" && info.name) { const cleanName = info.name + ".js"; manifestData[cleanName] = fileName; } } this.emitFile({ type: "asset", fileName: "manifest.json", source: JSON.stringify(manifestData, null, 2), }); }, }; } manifestGeneratorPlugin.manifestData = manifestData; module.exports = manifestGeneratorPlugin;