diff --git a/packages/astro/performance/content-benchmark.mjs b/packages/astro/performance/content-benchmark.mjs
index a0b78af31..40646ed03 100644
--- a/packages/astro/performance/content-benchmark.mjs
+++ b/packages/astro/performance/content-benchmark.mjs
@@ -60,6 +60,7 @@ async function benchmark({ fixtures, templates }) {
console.log(
`\n${bold('Simple')} ${dim(`${NUM_POSTS} posts (${formatsToString(fixtures)})`)}`
);
+ process.env.ASTRO_PERFORMANCE_TEST_NAME = 'simple';
await benchmark({
fixtures,
templates: {
@@ -77,6 +78,7 @@ async function benchmark({ fixtures, templates }) {
`${NUM_POSTS} posts (${formatsToString(fixtures)})`
)}`
);
+ process.env.ASTRO_PERFORMANCE_TEST_NAME = 'with-astro-components';
await benchmark({
fixtures,
templates: {
@@ -93,6 +95,7 @@ async function benchmark({ fixtures, templates }) {
`${NUM_POSTS} posts (${formatsToString(fixtures)})`
)}`
);
+ process.env.ASTRO_PERFORMANCE_TEST_NAME = 'with-react-components';
await benchmark({
fixtures,
templates: {
diff --git a/packages/astro/performance/fixtures/mdoc/astro.config.mjs b/packages/astro/performance/fixtures/mdoc/astro.config.mjs
index 8d9b6c194..aae6ad223 100644
--- a/packages/astro/performance/fixtures/mdoc/astro.config.mjs
+++ b/packages/astro/performance/fixtures/mdoc/astro.config.mjs
@@ -4,5 +4,36 @@ import react from "@astrojs/react";
// https://astro.build/config
export default defineConfig({
- integrations: [markdoc(), react()],
+ integrations: [markdoc({
+ nodes: process.env.ASTRO_PERFORMANCE_TEST_NAME === 'with-astro-components' ? {
+ heading: {
+ render: 'Heading',
+ attributes: {
+ level: { type: Number },
+ },
+ }
+ } : {},
+ tags: process.env.ASTRO_PERFORMANCE_TEST_NAME === 'with-astro-components' ? {
+ aside: {
+ render: 'Aside',
+ attributes: {
+ type: { type: String },
+ title: { type: String },
+ },
+ }
+ } : process.env.ASTRO_PERFORMANCE_TEST_NAME === 'with-react-components' ? {
+ 'like-button': {
+ render: 'LikeButton',
+ attributes: {
+ liked: { type: Boolean },
+ },
+ },
+ 'hydrated-like-button': {
+ render: 'HydratedLikeButton',
+ attributes: {
+ liked: { type: Boolean },
+ },
+ },
+ } : {},
+ }), react()],
});
diff --git a/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro b/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro
index 13b87c95c..3008f6119 100644
--- a/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro
+++ b/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro
@@ -1,5 +1,5 @@
---
-import { Title, Aside, LikeButton, HydratedLikeButton } from '@performance/utils';
+import { Heading, Aside, LikeButton, HydratedLikeButton } from '@performance/utils';
import type { CollectionEntry } from 'astro:content';
type Props = {
@@ -11,33 +11,8 @@ const { Content } = await entry.render();
---
{entry.data.type === 'with-astro-components'
- ?