diff --git a/.changeset/soft-icons-travel.md b/.changeset/soft-icons-travel.md new file mode 100644 index 0000000000..3d7b9f9629 --- /dev/null +++ b/.changeset/soft-icons-travel.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix for components, declared with JSXMemberExpression nodes, that failed to hydrate due to incomplete 'component-export' metadata diff --git a/packages/astro/e2e/fixtures/namespaced-component/astro.config.mjs b/packages/astro/e2e/fixtures/namespaced-component/astro.config.mjs index 08916b1fea..f7c8e034b6 100644 --- a/packages/astro/e2e/fixtures/namespaced-component/astro.config.mjs +++ b/packages/astro/e2e/fixtures/namespaced-component/astro.config.mjs @@ -1,7 +1,8 @@ import { defineConfig } from 'astro/config'; import preact from '@astrojs/preact'; +import mdx from "@astrojs/mdx"; // https://astro.build/config export default defineConfig({ - integrations: [preact()], + integrations: [preact(), mdx()] }); diff --git a/packages/astro/e2e/fixtures/namespaced-component/package.json b/packages/astro/e2e/fixtures/namespaced-component/package.json index 6968717cfc..96de360e26 100644 --- a/packages/astro/e2e/fixtures/namespaced-component/package.json +++ b/packages/astro/e2e/fixtures/namespaced-component/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "private": true, "devDependencies": { + "@astrojs/mdx": "workspace:*", "@astrojs/preact": "workspace:*", "astro": "workspace:*" }, diff --git a/packages/astro/e2e/fixtures/namespaced-component/src/pages/index.astro b/packages/astro/e2e/fixtures/namespaced-component/src/pages/index.astro index 608b48458b..7a65b02ae3 100644 --- a/packages/astro/e2e/fixtures/namespaced-component/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/namespaced-component/src/pages/index.astro @@ -1,5 +1,6 @@ --- import * as ns from '../components/PreactCounter.tsx'; +import { components } from '../components/PreactCounter.tsx'; --- @@ -10,9 +11,13 @@ import * as ns from '../components/PreactCounter.tsx';