Avoid re-traversing inserted references to the namespace binding. (#7418)

This commit is contained in:
Logan Smyth
2018-02-22 23:54:29 -08:00
committed by GitHub
parent 70627ac92c
commit 62c1046249
4 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import * as mod from "mod";
import { named } from "mod";
named;
mod;

View File

@@ -0,0 +1,6 @@
{
"plugins": [
["transform-modules-commonjs", {"lazy": true}],
"external-helpers"
]
}

View File

@@ -0,0 +1,14 @@
"use strict";
function mod() {
const data = babelHelpers.interopRequireWildcard(require("mod"));
mod = function () {
return data;
};
return data;
}
mod().named;
mod();