Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const a = "a";
const b = "b";
export { a, b };
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"sourceType": "module"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const a = "a";
const b = "b";
export { a, b };
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = babel => {

// TODO: look into evaluating binding too (could result in more code, but gzip?)
Expression(path, { opts: { tdz = false } = {} }) {
const { node } = path;
const { node, parent } = path;

if (node[seen]) {
return;
Expand All @@ -116,6 +116,11 @@ module.exports = babel => {
return;
}

// Avoid replacing the values for identifiers in exports
if (t.isExportSpecifier(parent)) {
return;
}

// -0 maybe compared via dividing and then checking against -Infinity
// Also -X will always be -X.
if (
Expand Down