From d8d125b2d7c364c48b56b5b3c4dda82760020149 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 30 Nov 2018 20:46:20 -0500 Subject: [PATCH] Update src/compile/wrapModule.ts Co-Authored-By: Rich-Harris --- src/compile/wrapModule.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compile/wrapModule.ts b/src/compile/wrapModule.ts index b28cb1b1fc..dfbd262030 100644 --- a/src/compile/wrapModule.ts +++ b/src/compile/wrapModule.ts @@ -65,7 +65,7 @@ function esm( ${code} export default ${name}; - ${module_exports.length > 0 && `export { ${module_exports.join(', ')} };`}`; + ${module_exports.length > 0 && `export { ${module_exports.map(e => e.name === e.as ? e.name : `${e.name} as ${e.as}`).join(', ')} };`}`; } function cjs(