-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Consolidate hydration scripts into just one #3571
Conversation
|
⚖️ Bundle Size CheckLatest commit: 7941c58
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the defineVars
codepath also runs the serializeProps
function. Reminder to check that we're deserializing that properly, too.
@natemoo-re Looks like define:vars is already using JSON.stringify, this is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good—going to try to break this locally, but since E2E tests are all passing I suspect this is good to go.
@@ -66,6 +66,7 @@ | |||
"vendor" | |||
], | |||
"scripts": { | |||
"prebuild": "astro-scripts prebuild --to-string \"src/runtime/server/astro-island.ts\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean, I like it!
@@ -121,7 +122,6 @@ | |||
"resolve": "^1.22.0", | |||
"rollup": "^2.75.5", | |||
"semver": "^7.3.7", | |||
"serialize-javascript": "^6.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very happy to see this go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff, LGTM!
* Remove redundant hydration scripts * Prebuild the island JS * Fix build * Updates to tests * Update more references * Custom element test now has two classic scripts * Account for non-default exports * Restructure hydration directives * Move nested logic into the island component * Remove try/catch
* Remove redundant hydration scripts * Prebuild the island JS * Fix build * Updates to tests * Update more references * Custom element test now has two classic scripts * Account for non-default exports * Restructure hydration directives * Move nested logic into the island component * Remove try/catch
Changes
astro-island
.Testing
Docs
N/A, perf improvement.