Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lazy option of babel-plugin-transform-modules-commonjs #9802

Merged
merged 2 commits into from Apr 1, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Update output snapshots for lazy mode of babel-plugin-transform-modul…

…es-commonjs (#9447)
  • Loading branch information...
AndreasCag committed Mar 31, 2019
commit 0331884c68463bb02eba8dd1899fcbf440dd89f2
@@ -1,16 +1,16 @@
"use strict";

var _white = babelHelpers.interopRequireDefault(require("white"));
function _white() {
const data = babelHelpers.interopRequireDefault(require("white"));

function _black() {
const data = babelHelpers.interopRequireDefault(require("black"));

_black = function () {
_white = function () {
return data;
};

return data;
}

console.log(_white.default);
console.log(_black().default);
var _black = babelHelpers.interopRequireDefault(require("black"));

console.log(_white().default);
console.log(_black.default);
@@ -1,16 +1,16 @@
"use strict";

var _white = require("white");
function _white() {
const data = require("white");

function _black() {
const data = require("black");

_black = function () {
_white = function () {
return data;
};

return data;
}

console.log(_white.foo1);
console.log(_black().foo2);
var _black = require("black");

console.log(_white().foo1);
console.log(_black.foo2);
@@ -1,16 +1,15 @@
"use strict";

var foo1 = babelHelpers.interopRequireDefault(require("white"));
function foo1() {
const data = babelHelpers.interopRequireDefault(require("white"));

function foo2() {
const data = babelHelpers.interopRequireDefault(require("black"));

foo2 = function () {
foo1 = function () {
return data;
};

return data;
}

console.log(foo1);
console.log(foo2());
var foo2 = babelHelpers.interopRequireDefault(require("black"));
console.log(foo1());
console.log(foo2);
@@ -6,8 +6,16 @@ Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _white.default;
return _white().default;
}
});

var _white = babelHelpers.interopRequireDefault(require("white"));
function _white() {
const data = babelHelpers.interopRequireDefault(require("white"));

_white = function () {
return data;
};

return data;
}
@@ -6,24 +6,24 @@ Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports, "named1", {
enumerable: true,
get: function () {
return _white.named1;
return _white().named1;
}
});
Object.defineProperty(exports, "named2", {
enumerable: true,
get: function () {
return _black().named2;
return _black.named2;
}
});

var _white = require("white");
function _white() {
const data = require("white");

function _black() {
const data = require("black");

_black = function () {
_white = function () {
return data;
};

return data;
}

var _black = require("black");
@@ -4,22 +4,22 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
exports.namespace2 = exports.namespace1 = void 0;
var namespace1 = babelHelpers.interopRequireDefault(require("white"));
exports.namespace1 = namespace1;

function namespace2() {
const data = babelHelpers.interopRequireDefault(require("black"));
function namespace1() {
const data = babelHelpers.interopRequireDefault(require("white"));

namespace2 = function () {
namespace1 = function () {
return data;
};

return data;
}

Object.defineProperty(exports, "namespace2", {
Object.defineProperty(exports, "namespace1", {
enumerable: true,
get: function () {
return namespace2();
return namespace1();
}
});
var namespace2 = babelHelpers.interopRequireDefault(require("black"));
exports.namespace2 = namespace2;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.