suppress hoist_props on export (#2463)

Miscellaneous
- fix double semi-colons from `beautify` in `export`

fixes #2462
This commit is contained in:
Alex Lam S.L
2017-11-10 17:38:31 +08:00
committed by GitHub
parent dd0a36119b
commit 650d5d5c9b
4 changed files with 34 additions and 2 deletions

View File

@@ -250,3 +250,13 @@ dynamic_import: {
r.foo();
}
}
trailing_comma: {
beautify = {
beautify: true,
}
input: {
export const a = 1;
}
expect_exact: "export const a = 1;"
}

View File

@@ -511,3 +511,22 @@ new_this: {
}
expect_stdout: "1 2"
}
issue_2462: {
options = {
hoist_props: true,
reduce_vars: true,
}
input: {
export const Foo = {
a: 1,
b: () => 2
};
}
expect: {
export const Foo = {
a: 1,
b: () => 2
};
}
}