function optimizeGraphPlugin({ publicPath = '', cssMinSize = 1000 } = {}) {
	DEBUG = hasDebugFlag();
	return {
		name: 'optimize-graph',
		async generateBundle(_, bundle) {
			const graph = new ChunkGraph(bundle, { publicPath });
			mergeAdjacentCss(graph);
			hoistCascadedCss(graph, { cssMinSize });
			await hoistEntryCss(graph);
			hoistTransitiveImports(graph);
		}
	};
}
Performs graph-based optimizations on generated assets and chunks:
- merges CSS assets that are always loaded together
- hoists CSS assets that are always loaded by the same parent chunk(s)
- merges CSS assets statically imported by entry chunks into entry CSS (<link rel=stylesheet>)
- hoists transitive JS and CSS imports, making chunks and styles load in parallel
@param {object} [options]
@param {string} [options.publicPath]
@param {number} [options.cssMinSize] CSS assets smaller than this number of bytes get merged into their parent
@returns {import('rollup').Plugin}