Update MDX example to address failure (#3799)
* fix: do not use symbol in JSX runtime * chore: update MDX example Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
parent
b9d26f39e2
commit
5fe52737cb
4 changed files with 15 additions and 5 deletions
5
.changeset/cyan-balloons-battle.md
Normal file
5
.changeset/cyan-balloons-battle.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix internal error for MDX integration
|
5
examples/with-mdx/.vscode/extensions.json
vendored
5
examples/with-mdx/.vscode/extensions.json
vendored
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"recommendations": ["astro-build.astro-vscode"],
|
||||
"recommendations": [
|
||||
"astro-build.astro-vscode",
|
||||
"silvenon.mdx"
|
||||
],
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
|
|
|
@ -2,16 +2,18 @@ import Counter from '../components/Counter.jsx';
|
|||
import Title from '../components/Title.astro';
|
||||
export const components = { h1: Title };
|
||||
|
||||
# Hello world!
|
||||
|
||||
export const authors = [
|
||||
{ name: 'Jane', email: 'hi@jane.com' },
|
||||
{ name: 'John', twitter: '@john2002' },
|
||||
];
|
||||
export const published = new Date('2022-02-01');
|
||||
|
||||
# Hello world!
|
||||
|
||||
Written by: {new Intl.ListFormat('en').format(authors.map(d => d.name))}.
|
||||
|
||||
Published on: {new Intl.DateTimeFormat('en', {dateStyle: 'long'}).format(published)}.
|
||||
|
||||
<Counter client:idle>## Counter</Counter>
|
||||
<Counter client:idle>
|
||||
## This is a counter!
|
||||
</Counter>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Fragment, markHTMLString } from '../runtime/server/index.js';
|
||||
|
||||
const AstroJSX = Symbol('@astrojs/jsx');
|
||||
const AstroJSX = 'astro:jsx';
|
||||
const Empty = Symbol('empty');
|
||||
|
||||
interface AstroVNode {
|
||||
|
|
Loading…
Reference in a new issue