astro-ghostcms/.pnpm-store/v3/files/66/00d4dc399380086db28a6204bad...

14 lines
616 B
Plaintext
Raw Permalink Normal View History

2024-02-14 14:10:47 +00:00
import type { PluginObj } from '@babel/core';
/**
* This plugin handles every file that runs through our JSX plugin.
* Since we statically match every JSX file to an Astro renderer based on import scanning,
* it would be helpful to embed some of that metadata at runtime.
*
* This plugin crawls each export in the file and "tags" each export with a given `rendererName`.
* This allows us to automatically match a component to a renderer and skip the usual `check()` calls.
*/
export default function tagExportsWithRenderer({ rendererName, }: {
rendererName: string;
root: URL;
}): Promise<PluginObj>;