function get_stylesheets(chunks) {
	/**
	 * A map of module IDs and the stylesheets they use.
	 * @type {Map<string, string[]>}
	 */
	const stylesheets_used = new Map();

	/**
	 * A map of stylesheet names and their content.
	 * @type {Map<string, string>}
	 */
	const stylesheet_content = new Map();

	for (const chunk of chunks) {
		if (chunk.type === 'asset') {
			if (chunk.fileName.endsWith('.css')) {
				stylesheet_content.set(chunk.fileName, chunk.source.toString());
			}
			continue;
		}

		if (chunk.viteMetadata?.importedCss.size) {
			const css = Array.from(chunk.viteMetadata.importedCss);
			for (const id of chunk.moduleIds) {
				stylesheets_used.set(id, css );
			}
		}
	}
	return { stylesheets_used, stylesheet_content };
}
@param {(import('vite').Rollup.OutputAsset | import('vite').Rollup.OutputChunk)[]} chunks