summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2023-08-11 10:05:02 -0400
committerGravatar GitHub <noreply@github.com> 2023-08-11 10:05:02 -0400
commit519a1c4e8407c7abcb8d879b67a9f4b960652cae (patch)
tree1d102fa0e3a64e885d9872c2ed944f76ca10a16c /packages/integrations/mdx
parent2ee418e06ab1f7855dee0078afbad0b06de3b183 (diff)
downloadastro-519a1c4e8407c7abcb8d879b67a9f4b960652cae.tar.gz
astro-519a1c4e8407c7abcb8d879b67a9f4b960652cae.tar.zst
astro-519a1c4e8407c7abcb8d879b67a9f4b960652cae.zip
JSX refactor (#7924)
* JSX refactor * Get preact/compat test to pass * Use include config * Remove old astro flavored markdown test * Move babel dep to preact * Remove errant debugger * Update lockfile * Update the multi-framework example * Update e2e tests * Fix nested-in-vue tests * Add back in astro check * Update packages/astro/src/core/create-vite.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Update packages/astro/src/core/create-vite.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Update packages/integrations/solid/src/index.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Update packages/integrations/solid/src/index.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Update .changeset/perfect-horses-tell.md Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Move the comment about the include config * Remove redundant alias config * Use react's own preamble code * Use the base for the preamble * Remove solid redundancy * Update .changeset/perfect-horses-tell.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update based on review comments * Oops --------- Co-authored-by: Fred K. Schott <fkschott@gmail.com> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Diffstat (limited to 'packages/integrations/mdx')
-rw-r--r--packages/integrations/mdx/src/index.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts
index ecf2a9a95..4cce23921 100644
--- a/packages/integrations/mdx/src/index.ts
+++ b/packages/integrations/mdx/src/index.ts
@@ -13,6 +13,7 @@ import type { Plugin as VitePlugin } from 'vite';
import { getRehypePlugins, getRemarkPlugins, recmaInjectImportMetaEnvPlugin } from './plugins.js';
import type { OptimizeOptions } from './rehype-optimize-static.js';
import { getFileInfo, ignoreStringPlugins, parseFrontmatter } from './utils.js';
+import astroJSXRenderer from 'astro/jsx/renderer.js';
export type MdxOptions = Omit<typeof markdownConfigDefaults, 'remarkPlugins' | 'rehypePlugins'> & {
extendMarkdownConfig: boolean;
@@ -37,9 +38,10 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
name: '@astrojs/mdx',
hooks: {
'astro:config:setup': async (params) => {
- const { updateConfig, config, addPageExtension, addContentEntryType, command } =
+ const { updateConfig, config, addPageExtension, addContentEntryType, command, addRenderer } =
params as SetupHookParams;
+ addRenderer(astroJSXRenderer);
addPageExtension('.mdx');
addContentEntryType({
extensions: ['.mdx'],