aboutsummaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/fixtures/mdx-component/src/pages/glob.astro
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/mdx/test/fixtures/mdx-component/src/pages/glob.astro')
-rw-r--r--packages/integrations/mdx/test/fixtures/mdx-component/src/pages/glob.astro20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/integrations/mdx/test/fixtures/mdx-component/src/pages/glob.astro b/packages/integrations/mdx/test/fixtures/mdx-component/src/pages/glob.astro
new file mode 100644
index 000000000..ab5f417b1
--- /dev/null
+++ b/packages/integrations/mdx/test/fixtures/mdx-component/src/pages/glob.astro
@@ -0,0 +1,20 @@
+---
+import { parse } from 'node:path';
+const components = await Astro.glob('../components/*.mdx');
+---
+
+<div data-default-export>
+ {components.map(Component => (
+ <div data-file={parse(Component.file).base}>
+ <Component.default />
+ </div>
+ ))}
+</div>
+
+<div data-content-export>
+ {components.map(({ Content, file }) => (
+ <div data-file={parse(file).base}>
+ <Content />
+ </div>
+ ))}
+</div>