async function compileSvelteModule(options, { filename, code }, statsCollection) {
	const endStat = statsCollection?.start(filename);
	const compiled = svelte.compileModule(code, {
		dev: options.compilerOptions?.dev ?? true, // default to dev: true because prebundling is only used in dev
		filename,
		generate: 'client'
	});
	if (endStat) {
		endStat();
	}
	return {
		...compiled.js,
		moduleType: 'js'
	};
}
@param {import('../types/options.d.ts').ResolvedOptions} options
@param {{ filename: string; code: string }} input
@param {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection} [statsCollection]
@returns {Promise<import('../types/compile.d.ts').Code>}