Use supportsStaticESM to toggle runtime module usage. (#8520)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
class Foo extends Bar {}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"caller": {
|
||||
"name": "babel-test",
|
||||
"supportsStaticESM": true
|
||||
},
|
||||
"plugins": [["transform-runtime", { "useESModules": "auto" }], "transform-classes"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
||||
|
||||
var _possibleConstructorReturn = require("@babel/runtime/helpers/possibleConstructorReturn");
|
||||
|
||||
var _getPrototypeOf = require("@babel/runtime/helpers/getPrototypeOf");
|
||||
|
||||
var _inherits = require("@babel/runtime/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);
|
||||
@@ -1,3 +1,7 @@
|
||||
{
|
||||
"caller": {
|
||||
"name": "babel-test",
|
||||
"supportsStaticESM": true
|
||||
},
|
||||
"plugins": [["transform-runtime", { "useESModules": true }], "transform-classes"]
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
class Foo extends Bar {}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"caller": {
|
||||
"name": "babel-test",
|
||||
"supportsStaticESM": true
|
||||
},
|
||||
"plugins": [["transform-runtime", { "useESModules": "auto" }], "transform-classes"]
|
||||
}
|
||||
@@ -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);
|
||||
@@ -1,3 +1,7 @@
|
||||
{
|
||||
"caller": {
|
||||
"name": "babel-test",
|
||||
"supportsStaticESM": true
|
||||
},
|
||||
"plugins": [["transform-runtime", { "useESModules": true }], "transform-classes"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user