function buildIdFilter(options) {
	const { include = [], exclude = [], extensions = DEFAULT_SVELTE_EXT } = options;
	// this regex combines configured extensions and looks for them at the end of the string or directly before first ? or #
	const extensionsRE = new RegExp(
		`^[^?#]+\\.(?:${extensions
			.map((e) => (e.startsWith('.') ? e.slice(1) : e))
			.map(escapeRE)
			.join('|')})(?:[?#]|$)`
	);
	const filter = {
		id: {
			include: [extensionsRE, .../**@type {Array<string|RegExp>}*/ arraify(include)],
			exclude: /**@type {Array<string|RegExp>}*/ arraify(exclude)
		}
	};
	return filter;
}
@param {import('../types/options.d.ts').ResolvedOptions} options
@returns {import('../types/id.d.ts').IdFilter}