Skip to content

Conversation

@brophdawg11
Copy link
Contributor

@brophdawg11 brophdawg11 commented Nov 30, 2023

Quick stab at duplicating the current loader HDR logic to apply to clientLoader

No need to duplicate - can just check the exports slightly differently in the current plugin.

Vite HDR is working. HMR of HydrateFallback is not working currently - see TODO comment in the code

@changeset-bot
Copy link

changeset-bot bot commented Nov 30, 2023

⚠️ No Changeset found

Latest commit: 4525fd0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@brophdawg11 brophdawg11 added package:dev feat:dx Issues related to the developer experience labels Dec 1, 2023
@brophdawg11 brophdawg11 mentioned this pull request Dec 1, 2023
4 tasks
@brophdawg11 brophdawg11 changed the title First pass at HDR for clientLoader Support HMR/HDR for Client Data Dec 1, 2023
@brophdawg11 brophdawg11 force-pushed the brophdawg11/client-data-hdr branch from f4bb9f3 to c6e9e1e Compare December 1, 2023 21:55
} else if (theExports.includes("clientLoader")) {
contents = `export { clientLoader } from ${JSON.stringify(
`./${file}`
)};`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enable HDR for clientLoader by adapting the current tree shaking approach for fine-grained loader-change detection to also support clientLoader. Need these branches since esbuild will complain if we try to import a non-existent named export

"HydrateFallback",
"action",
"clientAction",
"clientLoader",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allow these to be exported from a route module

"handle",
"meta",
"links",
"shouldRevalidate",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add non-component exports to accept for hot updates

@brophdawg11 brophdawg11 merged commit a2b26d3 into feature/client-data Dec 4, 2023
@brophdawg11 brophdawg11 deleted the brophdawg11/client-data-hdr branch December 4, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed feat:dx Issues related to the developer experience package:dev

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants