function viteStyle(config = {}) {
	/** @type {Promise<CssTransform> | CssTransform} */
	let cssTransform;
	/** @type {import('svelte/compiler').Preprocessor} */
	const style = async ({ attributes, content, filename = '' }) => {
		const ext = attributes.lang ? `.${attributes.lang}` : '.css';
		if (attributes.lang && !isCSSRequest(ext)) return;
		if (!cssTransform) {
			cssTransform = createCssTransform(style, config).then((t) => (cssTransform = t));
		}
		const transform = await cssTransform;
		const suffix = `${lang_sep}${ext}`;
		const moduleId = `${filename}${suffix}`;
		const { code, map, deps } = await transform(content, moduleId);
		removeLangSuffix(map, suffix);
		mapToRelative(map, filename);
		const dependencies = deps ? Array.from(deps).filter((d) => !d.endsWith(suffix)) : undefined;
		return {
			code,
			map: map ?? undefined,
			dependencies
		};
	};
	// @ts-expect-error tag so can be found by v-p-s
	style.__resolvedConfig = null;
	return { style };
}
@param {import('vite').ResolvedConfig | import('vite').InlineConfig} config
@returns {{ style: import('svelte/compiler').Preprocessor }}