Skip to content

Commit a44ef5e

Browse files
authored
Merge pull request #16 from dnakov/master
allow multiple named exports
2 parents 4f8c29e + c0fea0c commit a44ef5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function toCjs(code, exportsObjName, exports) {
8383
exports.default = true;
8484
return `${before}${exportsObjName}.default=`;
8585
});
86-
code = code.replace(/^(\s*)export\s+(function|const|let|var)(\s+)([a-zA-Z$_][a-zA-Z0-9$_]*)/m, (s, before, type, ws, name) => {
86+
code = code.replace(/^(\s*)export\s+(function|const|let|var)(\s+)([a-zA-Z$_][a-zA-Z0-9$_]*)/mg, (s, before, type, ws, name) => {
8787
exports[name] = true;
8888
return `${before}${exportsObjName}.${name}=${type}${ws}${name}`;
8989
});

0 commit comments

Comments
 (0)