Skip to content

Commit e2045fc

Browse files
committed
fix: not handling export default value
1 parent 93c0208 commit e2045fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bundle-generator.ts

+6
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,12 @@ function updateResultForRootSourceFile(params: UpdateParams, result: CollectingR
470470
for (const statement of params.statements) {
471471
// "export default" or "export ="
472472
const isExportAssignment = ts.isExportAssignment(statement);
473+
474+
if (isExportAssignment && !statement.isExportEquals && ts.isIdentifier(statement.expression)) {
475+
result.renamedExports.push(`${statement.expression.getText()} as default`);
476+
continue;
477+
}
478+
473479
const isReExportFromImportable = isReExportFromImportableModule(statement);
474480

475481
if (isExportAssignment || isReExportFromImportable) {

0 commit comments

Comments
 (0)