kjelsrud.dev/node_modules/astro/dist/content/vite-plugin-content-virtual-mod.d.ts

23 lines
940 B
TypeScript
Raw Normal View History

2023-07-19 21:31:30 +02:00
/// <reference types="node" />
import fsMod from 'node:fs';
import type { Plugin } from 'vite';
import type { AstroSettings, ContentEntryType } from '../@types/astro.js';
import { type ContentPaths } from './utils.js';
interface AstroContentVirtualModPluginParams {
settings: AstroSettings;
}
export declare function astroContentVirtualModPlugin({ settings, }: AstroContentVirtualModPluginParams): Plugin;
/**
* Generate a map from a collection + slug to the local file path.
* This is used internally to resolve entry imports when using `getEntry()`.
* @see `content-module.template.mjs`
*/
export declare function getStringifiedLookupMap({ contentPaths, contentEntryConfigByExt, dataEntryExts, root, fs, }: {
contentEntryConfigByExt: Map<string, ContentEntryType>;
dataEntryExts: string[];
contentPaths: Pick<ContentPaths, 'contentDir' | 'config'>;
root: URL;
fs: typeof fsMod;
}): Promise<string>;
export {};