Skip to content

Commit

Permalink
Updates an error handler to expect updated @astrojs/lit behavior (w…
Browse files Browse the repository at this point in the history
…ithastro#3766)

* fix: don't throw an error when the lit renderer doesn't provide a clientEntrypoint

* updating the framework-lit example to match new behavior

* fix: updating the playground example to latest lit syntax
  • Loading branch information
Tony Sullivan authored Jun 29, 2022
1 parent 02733b1 commit 9eb32a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr
}
}

if (renderer && !renderer.clientEntrypoint && metadata.hydrate) {
// HACK! The lit renderer doesn't include a clientEntrypoint for custom elements, allow it
// to render here until we find a better way to recognize when a client entrypoint isn't required.
if (renderer && !renderer.clientEntrypoint && renderer.name !== '@astrojs/lit' && metadata.hydrate) {
throw new Error(
`${metadata.displayName} component has a \`client:${metadata.hydrate}\` directive, but no client entrypoint was provided by ${renderer.name}!`
);
Expand Down

0 comments on commit 9eb32a7

Please sign in to comment.