Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show warning about hydrating Astro components in build #5501

Merged
merged 2 commits into from Dec 1, 2022

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Nov 30, 2022

Changes

Bit of a lazy fix. I was hoping to be able to provide more information in the warning, but much like what I faced in #5316, we don't have access to much there. In the future, I'd like to investigate a larger endeavour there to see if we can drill down info for error / warnings reporting (or bubble up warnings and errors, maybe?)

For now this is still an improvement. It's not that big of an issue that the location isn't in the message as the warning will show up when you visit the page / build it so you'll know either way in which file it is. In the future we'll also add an editor warning for this, which should also help users avoid this situation!

Fix #4090

Testing

Tested manually

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Nov 30, 2022

🦋 Changeset detected

Latest commit: 26f1e97

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 30, 2022
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we're also doing build-time warnings in other places so this seems good to me too 👍

@Princesseuh Princesseuh merged commit 3c44033 into main Dec 1, 2022
@Princesseuh Princesseuh deleted the astro-hydrate-build-warning branch December 1, 2022 16:41
@astrobot-houston astrobot-houston mentioned this pull request Dec 1, 2022
@bluwy bluwy mentioned this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 No good error message when adding a client directive to an Astro component
2 participants