mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
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;
|
const { hydrate, componentUrl, componentExport } = metadata;
|
||||||
|
|
||||||
if (!componentExport.value) {
|
if (!componentExport.value) {
|
||||||
throw new Error(
|
throw new AstroError({
|
||||||
`Unable to resolve a valid export for "${metadata.displayName}"! Please open an issue at https://astro.build/issues!`
|
...AstroErrorData.NoMatchingImport,
|
||||||
);
|
message: AstroErrorData.NoMatchingImport.message(metadata.displayName),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const island: SSRElement = {
|
const island: SSRElement = {
|
||||||
|
|
Loading…
Reference in a new issue