From fd57b1766f93b31236c23a6b624af3702d59148f Mon Sep 17 00:00:00 2001 From: Guillaume des Pommare Date: Thu, 1 Jul 2021 16:57:25 +0200 Subject: [PATCH] Fix ExportNamedDeclaration. expect declaration to be undefined for interfaces. --- packages/plugin/src/modules/visitor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin/src/modules/visitor.js b/packages/plugin/src/modules/visitor.js index f72a6b4..e7eab1f 100644 --- a/packages/plugin/src/modules/visitor.js +++ b/packages/plugin/src/modules/visitor.js @@ -209,7 +209,8 @@ export const ModuleTransformVisitor = { } path.replaceWith(declaration); } else { - throw path.buildCodeFrameError("Unknown ExportNamedDeclaration shape."); + path.remove(); + return; } },