/** * Create smart processors to handle different formats. * * @param {Options} [options] */ export function createLoader(options?: Options | undefined): { load: (url: string, context: unknown, defaultLoad: Function) => Promise getFormat: (url: string, context: unknown, defaultGetFormat: Function) => any transformSource: ( value: string, context: { [x: string]: unknown url: string }, defaultTransformSource: Function ) => Promise } export type CompileOptions = import('../compile.js').CompileOptions export type LoaderOptions = { /** * Several JSX runtimes, notably React and Emotion, don’t yet have a proper * export map set up. * Export maps are needed to map `xxx/jsx-runtime` to an actual file in ESM. * This option fixes React et al by turning those into `xxx/jsx-runtime.js`. */ fixRuntimeWithoutExportMap?: boolean | undefined } export type Options = CompileOptions & LoaderOptions