-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
chore: improve SSR invalid element error message #11585
Conversation
🦋 Changeset detectedLatest commit: f647f30 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
I didn't realise we were doing this |
@Rich-Harris The issue was that no one was seeing that error and if we threw an actual error than the server instance would go down and that wasn't great. Since introducing |
…ent is guaranteed to not be null
This should make error messages for invalid elements during SSR better, as it lets you know what component the element is in. Addressing part of the problem from #10630. In a follow up, once I have time, it would be good to add line numbers too to the filenames.
Before
After