mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(codegen): print necessary spaces for ExportAllDeclaration (#2190)
This commit is contained in:
parent
41fb7ef7e7
commit
d34650a1ac
2 changed files with 8 additions and 3 deletions
|
|
@ -805,15 +805,15 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for ExportAllDeclaration<'a> {
|
|||
if self.is_typescript_syntax() {
|
||||
return;
|
||||
}
|
||||
p.print_str(b"export");
|
||||
p.print_str(b"export ");
|
||||
p.print(b'*');
|
||||
|
||||
if let Some(exported) = &self.exported {
|
||||
p.print_str(b"as ");
|
||||
p.print_str(b" as ");
|
||||
exported.gen(p, ctx);
|
||||
}
|
||||
|
||||
p.print_str(b" from");
|
||||
p.print_str(b" from ");
|
||||
self.source.gen(p, ctx);
|
||||
self.with_clause.gen(p, ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -100,3 +100,8 @@ fn template() {
|
|||
test("new tag()`${x}`", "new tag()`${x}`;\n");
|
||||
test("(new tag)`${x}`", "new tag()`${x}`;\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn module_decl() {
|
||||
test("export * as foo from 'foo'", "export * as foo from 'foo';\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue