mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
entry_point_kinds only at source_index
This commit is contained in:
@@ -9890,19 +9890,17 @@ const LinkerContext = struct {
|
||||
}
|
||||
|
||||
const records = this.import_records[source_index].slice();
|
||||
const kind = this.entry_point_kinds[source_index];
|
||||
for (this.export_star_records[source_index]) |id| {
|
||||
const record = records[id];
|
||||
if (record.source_index.isValid()) {
|
||||
// This file has dynamic exports if the exported imports are from a file
|
||||
// that either has dynamic exports directly or transitively by itself
|
||||
// having an export star from a file with dynamic exports.
|
||||
const kind = this.entry_point_kinds[record.source_index.get()];
|
||||
if ((record.source_index.isInvalid() and (!kind.isEntryPoint() or !this.output_format.keepES6ImportExportSyntax())) or
|
||||
(record.source_index.isValid() and record.source_index.get() != source_index and this.hasDynamicExportsDueToExportStar(record.source_index.get())))
|
||||
{
|
||||
this.exports_kind[source_index] = .esm_with_dynamic_fallback;
|
||||
return true;
|
||||
}
|
||||
// This file has dynamic exports if the exported imports are from a file
|
||||
// that either has dynamic exports directly or transitively by itself
|
||||
// having an export star from a file with dynamic exports.
|
||||
if ((record.source_index.isInvalid() and (!kind.isEntryPoint() or !this.output_format.keepES6ImportExportSyntax())) or
|
||||
(record.source_index.isValid() and record.source_index.get() != source_index and this.hasDynamicExportsDueToExportStar(record.source_index.get())))
|
||||
{
|
||||
this.exports_kind[source_index] = .esm_with_dynamic_fallback;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user