enable the allowUndeclaredExports Babel option (#6660)

master
Georgii Dolzhykov 2019-10-15 18:32:46 +03:00 committed by GitHub
parent ab598e6e23
commit d4537dc5f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,7 @@ function babelOptions(extraOptions, extraPlugins) {
allowImportExportEverywhere: true,
allowReturnOutsideFunction: true,
allowSuperOutsideMethod: true,
allowUndeclaredExports: true,
plugins: [
"jsx",
"doExpressions",

View File

@ -14,6 +14,8 @@ export * as ns from "mod";
export * as foo,{bar} from "./baz";
export { undefinedExport };
=====================================output=====================================
export {
value1,
@ -29,5 +31,7 @@ export * as ns from "mod";
export * as foo, { bar } from "./baz";
export { undefinedExport };
================================================================================
`;

View File

@ -5,3 +5,5 @@ export a,{b} from "./baz";
export * as ns from "mod";
export * as foo,{bar} from "./baz";
export { undefinedExport };