mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
Embed React Fast Refresh in Bun
Fixes https://github.com/Jarred-Sumner/bun/issues/62 If the project has it's own copy of react fast refresh and is bundling, it will use that instead.
This commit is contained in:
@@ -152,8 +152,8 @@ pub const NodeModuleBundle = struct {
|
||||
}
|
||||
|
||||
pub fn getPackage(this: *const NodeModuleBundle, name: string) ?*const Api.JavascriptBundledPackage {
|
||||
const package_id = this.getPackageID(name) orelse return null;
|
||||
return &this.bundle.packages[@intCast(usize, package_id)];
|
||||
const package_id = this.getPackageIDByName(name) orelse return null;
|
||||
return &this.bundle.packages[@intCast(usize, package_id[0])];
|
||||
}
|
||||
|
||||
pub fn hasModule(this: *const NodeModuleBundle, name: string) ?*const Api.JavascriptBundledPackage {
|
||||
|
||||
Reference in New Issue
Block a user