preactjs / wmr

👩‍🚀 The tiny all-in-one development tool for modern web apps.
https://wmr.dev/
MIT License
4.92k stars 109 forks source link

Fix/prerender hydration #895

Closed rschristian closed 2 years ago

rschristian commented 2 years ago

Hydration vs rendering is determined by whether script[type=isodata] can be found, however, #585 limited this to only existing when returning prerender data.

I attempted to pick through the slack as noted here , though I'm still not sure I haven't missed something that would indicate this is intentional, so let me know. This just seemed like the simplest solution to bring this up with.

If we don't want preact-iso to return isodata we'll probably need some other marker to decide whether to hydrate or not?

changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: ac05e3ac931d110e53031fa63e21fb78f5611536

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

This PR includes changesets to release 2 packages | Name | Type | | ---------- | ----- | | preact-iso | Patch | | wmr | Patch |

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[bot] commented 2 years ago

Size Change: 0 B

Total Size: 6.31 kB

ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `packages/preact-iso/.dist/index.********.js` | 1.72 kB | | `packages/preact-iso/.dist/prerender.********.js` | 349 B | | `packages/preact-iso/hydrate.js` | 290 B | | `packages/preact-iso/index.js` | 195 B | | `packages/preact-iso/lazy.js` | 594 B | | `packages/preact-iso/prerender.js` | 629 B | | `packages/preact-iso/router.js` | 2.54 kB |

compressed-size-action

rschristian commented 2 years ago

There's a couple of flakey tests that seem to be taking turns on failing, reran the CI a few times now with no luck.

rschristian commented 2 years ago

That makes sense. Should be corrected now, assuming I'm not missing something.

CI gods finally graced me with a pass too.