Reference the CommonJS helpers when a file is not explicitly a module. (#8518)

This commit is contained in:
Logan Smyth
2018-08-23 15:09:14 -07:00
committed by GitHub
parent 22bcfbe469
commit 023044c1d4
13 changed files with 67 additions and 51 deletions

View File

@@ -1,23 +0,0 @@
var _classCallCheck = require("@babel/runtime-corejs2/helpers/esm/classCallCheck");
var _possibleConstructorReturn = require("@babel/runtime-corejs2/helpers/esm/possibleConstructorReturn");
var _getPrototypeOf = require("@babel/runtime-corejs2/helpers/esm/getPrototypeOf");
var _inherits = require("@babel/runtime-corejs2/helpers/esm/inherits");
let Foo =
/*#__PURE__*/
function (_Bar) {
"use strict";
_inherits(Foo, _Bar);
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;
}(Bar);

View File

@@ -0,0 +1,18 @@
import _classCallCheck from "@babel/runtime-corejs2/helpers/esm/classCallCheck";
import _possibleConstructorReturn from "@babel/runtime-corejs2/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime-corejs2/helpers/esm/getPrototypeOf";
import _inherits from "@babel/runtime-corejs2/helpers/esm/inherits";
let Foo =
/*#__PURE__*/
function (_Bar) {
_inherits(Foo, _Bar);
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;
}(Bar);

View File

@@ -1,23 +0,0 @@
var _classCallCheck = require("@babel/runtime-corejs2/helpers/classCallCheck");
var _possibleConstructorReturn = require("@babel/runtime-corejs2/helpers/possibleConstructorReturn");
var _getPrototypeOf = require("@babel/runtime-corejs2/helpers/getPrototypeOf");
var _inherits = require("@babel/runtime-corejs2/helpers/inherits");
let Foo =
/*#__PURE__*/
function (_Bar) {
"use strict";
_inherits(Foo, _Bar);
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;
}(Bar);

View File

@@ -0,0 +1,18 @@
import _classCallCheck from "@babel/runtime-corejs2/helpers/classCallCheck";
import _possibleConstructorReturn from "@babel/runtime-corejs2/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime-corejs2/helpers/getPrototypeOf";
import _inherits from "@babel/runtime-corejs2/helpers/inherits";
let Foo =
/*#__PURE__*/
function (_Bar) {
_inherits(Foo, _Bar);
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;
}(Bar);

View File

@@ -1,10 +1,10 @@
var _classCallCheck = require("@babel/runtime/helpers/esm/classCallCheck");
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
var _possibleConstructorReturn = require("@babel/runtime/helpers/esm/possibleConstructorReturn");
var _possibleConstructorReturn = require("@babel/runtime/helpers/possibleConstructorReturn");
var _getPrototypeOf = require("@babel/runtime/helpers/esm/getPrototypeOf");
var _getPrototypeOf = require("@babel/runtime/helpers/getPrototypeOf");
var _inherits = require("@babel/runtime/helpers/esm/inherits");
var _inherits = require("@babel/runtime/helpers/inherits");
let Foo =
/*#__PURE__*/

View File

@@ -0,0 +1 @@
class Foo extends Bar {}

View File

@@ -0,0 +1,3 @@
{
"plugins": [["transform-runtime", { "useESModules": true }], "transform-classes"]
}

View File

@@ -0,0 +1,18 @@
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/esm/inherits";
let Foo =
/*#__PURE__*/
function (_Bar) {
_inherits(Foo, _Bar);
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;
}(Bar);