parent
aa265d7302
commit
d78806dfe0
2 changed files with 9 additions and 3 deletions
5
.changeset/fair-otters-worry.md
Normal file
5
.changeset/fair-otters-worry.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Improve error message when user attempts to render a dynamic component reference
|
|
@ -122,9 +122,10 @@ export async function generateHydrateScript(
|
|||
const { hydrate, componentUrl, componentExport } = metadata;
|
||||
|
||||
if (!componentExport.value) {
|
||||
throw new Error(
|
||||
`Unable to resolve a valid export for "${metadata.displayName}"! Please open an issue at https://astro.build/issues!`
|
||||
);
|
||||
throw new AstroError({
|
||||
...AstroErrorData.NoMatchingImport,
|
||||
message: AstroErrorData.NoMatchingImport.message(metadata.displayName),
|
||||
});
|
||||
}
|
||||
|
||||
const island: SSRElement = {
|
||||
|
|
Loading…
Reference in a new issue