support string namespace in import & export (#5570)

This commit is contained in:
Alex Lam S.L
2022-07-19 22:55:38 +01:00
committed by GitHub
parent f0120e90b6
commit d67daa8314
9 changed files with 295 additions and 134 deletions

View File

@@ -40,6 +40,17 @@ default_keys: {
expect_exact: 'import foo,{bar}from"baz";'
}
non_identifiers: {
beautify = {
quote_style: 3,
}
input: {
import { '42' as foo } from "bar";
import { "foo" as bar } from 'baz';
}
expect_exact: "import{'42'as foo}from\"bar\";import{foo as bar}from'baz';"
}
dynamic: {
input: {
(async a => await import(a))("foo").then(bar);