Hey everyone 👋
https://github.com/withastro/astro/issues/7287
Im getting and error when trying to hydrate components that ive imported via the astro.glob() function.
Im working on a lightweight foss cms and want to move to Astro as it would fairly easy allow me to make it framework agnostic.
In my index.astro im importing my svelte components using
const svelteComponents = await Astro.glob('../components/*.svelte');
and rendering as explained in the docs like:
{svelteComponents.map((comp) => <comp.default/>)}
this works fine, but Im not able to hydrate them using client:load without getting an Exception.
Ive created a Stackblitz showcasing my issue:
https://stackblitz.com/edit/stackblitz-starters-amlrvz?file=src%2Fpages%2Findex.astro
I coudnt find anything on the docs or forums regarding this Issue.
I would be very happy if someone could forward me any posts, docs, etc to me or directly giving me a solution to this here.
The Exception:
error Unable to resolve a valid export for "comp.default"! Please open an issue at https://astro.build/issues!
File:
/Users/janeckerlein/development/web/glob-import-client-load-issue/node_modules/astro/dist/runtime/server/hydration.js:79:11
Code:
78 | children: "",
> 79 | props: {
| ^
80 | // This is for HMR, probably can avoid it in prod
81 | uid: astroId
82 | }
Thanks in advance