-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
hot module reloading for HTML import development mode #16955
Conversation
Updated 10:40 PM PT - Feb 7th, 2025
❌ @paperclover, your commit d2771a1 has 2 failures in
🧪 try this PR locally: bunx bun-pr 16955 |
@@ -10,8 +10,8 @@ | |||
"@typescript-eslint/eslint-plugin": "^7.11.0", | |||
"@typescript-eslint/parser": "^7.11.0", | |||
"@vscode/debugadapter": "^1.65.0", | |||
"autoprefixer": "^10.4.20", | |||
"caniuse-lite": "^1.0.30001660", | |||
"autoprefixer": "^10.4.19", |
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.
downgraded
|
||
if (bun.FeatureFlags.bake_debugging_features and dev.has_pre_crash_handler) | ||
try bun.crash_handler.appendPreCrashHandler(DevServer, dev, dumpStateDueToCrash); | ||
|
||
return dev; | ||
} | ||
|
||
pub fn deinit(dev: *DevServer) void { | ||
// TODO: Currently deinit is not implemented, as it was assumed to be alive for | ||
// the remainder of this process' lifespan. This isn't always true. |
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.
is especially not true now that server.stop() can make this happen
} | ||
|
||
fn memoryCostArrayList(slice: anytype) usize { | ||
return slice.capacity * @sizeOf(@typeInfo(@TypeOf(slice.items)).pointer.child); |
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.
imo this is too clever it can just use allocatedSlice() or one of those
Fixes #16335
DevServer gains a new type of RouteBundle for HTML imports. HTML imports have no server files, but may co-exist alongside server routes. While only SPA-style apps are supported now, the tech supports RSC in the same graph as these HTML route bundles.
Instead of
framework: "react"
, the framework option is currently unspecifiable. To allow React to 'just work', the default framework will automatically configurereact-refresh
if it is installed. If onlyreact
is installed, then an embedded copy ofreact-refresh
is enabled to make that also 'just work'.This PR also resolves some but not all requirements to use HMR reliably, so I still call it experimental. It is very close though.