diff options
Diffstat (limited to 'packages/integrations/mdx/src/index.ts')
-rw-r--r-- | packages/integrations/mdx/src/index.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index 3aaed8787..bd0278933 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -1,7 +1,7 @@ import fs from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; import { markdownConfigDefaults } from '@astrojs/markdown-remark'; -import type { AstroIntegration, ContentEntryType, HookParameters } from 'astro'; +import type { AstroIntegration, ContainerRenderer, ContentEntryType, HookParameters } from 'astro'; import astroJSXRenderer from 'astro/jsx/renderer.js'; import type { Options as RemarkRehypeOptions } from 'remark-rehype'; import type { PluggableList } from 'unified'; @@ -28,6 +28,13 @@ type SetupHookParams = HookParameters<'astro:config:setup'> & { addContentEntryType: (contentEntryType: ContentEntryType) => void; }; +export function getContainerRenderer(): ContainerRenderer { + return { + name: 'astro:jsx', + serverEntrypoint: 'astro/jsx/server.js', + }; +} + export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroIntegration { // @ts-expect-error Temporarily assign an empty object here, which will be re-assigned by the // `astro:config:done` hook later. This is so that `vitePluginMdx` can get hold of a reference earlier. |