Compare commits

...

1 Commits

Author SHA1 Message Date
Don Isaac
1ee4fd6fb1 fix(bundler): properly record if we loaded a "file" 2025-03-06 21:27:08 -08:00
2 changed files with 4 additions and 3 deletions

View File

@@ -739,7 +739,7 @@ pub const JSBundler = struct {
.value = .pending,
.path = parse.path.text,
.namespace = parse.path.namespace,
.was_file = false,
.was_file = parse.path.isFile(),
.called_defer = false,
.task = undefined,
.js_task = undefined,
@@ -1013,7 +1013,7 @@ pub const JSBundler = struct {
onstart_promises_array: JSC.JSValue,
is_last: bool,
is_bake: bool,
) !JSValue {
) bun.JSError!JSValue {
JSC.markBinding(@src());
const tracer = bun.tracy.traceNamed(@src(), "JSBundler.addPlugin");
defer tracer.end();

View File

@@ -2204,7 +2204,8 @@ pub const BundleV2 = struct {
const source = &this.graph.input_files.items(.source)[load.source_index.get()];
// If it's a file namespace, we should run it through the parser like normal.
// The file could be on disk.
if (source.path.isFile()) {
if (load.was_file) {
bun.assert(source.path.isFile());
this.graph.pool.schedule(load.parse_task);
return;
}