function removeLangSuffix(map, suffix) {
	if (!map) {
		return;
	}
	/** @type {(s:string)=> string} */
	const removeSuffix = (s) => (s?.endsWith(suffix) ? s.slice(0, -1 * suffix.length) : s);
	if (map.file) {
		map.file = removeSuffix(map.file);
	}
	if (map.sources) {
		map.sources = map.sources.map(removeSuffix);
	}
}
vitePreprocess uses an extra lang extension to tell vite about the type of preprocessor to use
This function removes it afterwards to get back working file refs

map is modified in place.

@param {SourceMapFileRefs | undefined} map the output sourcemap
@param {string} suffix the suffix to remove