fix corner cases with export (#4699)
fixes #4698 fixes #4700 fixes #4701 fixes #4702
This commit is contained in:
@@ -53,7 +53,7 @@ exports.strip_exports = function(code) {
|
||||
var count = 0;
|
||||
return code.replace(/\bexport(?:\s*\{[^}]*};|\s+default\b(?:\s*(\(|\{|class\s*\{|class\s+(?=extends\b)|(?:async\s+)?function\s*(?:\*\s*)?\())?|\b)/g, function(match, header) {
|
||||
if (!header) return "";
|
||||
if (header.length == 1) return "~" + header;
|
||||
if (header.length == 1) return "!!" + header;
|
||||
return header.slice(0, -1) + " _" + ++count + header.slice(-1);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user