-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving error messages for invalid client hydration directives (#2076)
* Adding check to make sure the hydration directive is valid * remove temp debug logging * Adding a check for media query with client:media + small refactor * adding changeset Co-authored-by: Tony Sullivan <tony.sullivan@hyperlab.se>
- Loading branch information
Tony Sullivan
and
Tony Sullivan
committed
Dec 1, 2021
1 parent
bebb312
commit 920d3da
Showing
6 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Improving build validation and error messages for client hydration directives |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/astro/test/fixtures/errors/src/components/SvelteDirectiveError.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>I shouldn’t be here</h1> | ||
|
7 changes: 7 additions & 0 deletions
7
packages/astro/test/fixtures/errors/src/pages/astro-client-media-error.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
import SvelteDirectiveError from '../components/SvelteDirectiveError.svelte'; | ||
--- | ||
|
||
<div> | ||
<SvelteDirectiveError client:media /> | ||
</div> |
7 changes: 7 additions & 0 deletions
7
packages/astro/test/fixtures/errors/src/pages/astro-hydration-error.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
import SvelteDirectiveError from '../components/SvelteDirectiveError.svelte'; | ||
--- | ||
|
||
<div> | ||
<SvelteDirectiveError client:loadm /> | ||
</div> |