Allow transform-runtime to insert runtime references with absolute paths. (#8435)

This commit is contained in:
Logan Smyth
2018-08-14 16:11:19 -07:00
committed by GitHub
parent 8c65230258
commit 1e0b649485
9 changed files with 91 additions and 15 deletions

View File

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

View File

@@ -0,0 +1,6 @@
{
"plugins": [
"transform-classes",
["transform-runtime", { "absoluteRuntime": "./subfolder" }]
]
}

View File

@@ -0,0 +1,7 @@
var _classCallCheck = require("<CWD>/packages/babel-plugin-transform-runtime/node_modules/@babel/runtime/helpers/classCallCheck");
let Foo = function Foo() {
"use strict";
_classCallCheck(this, Foo);
};

View File

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

View File

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

View File

@@ -0,0 +1,7 @@
var _classCallCheck = require("<CWD>/packages/babel-plugin-transform-runtime/node_modules/@babel/runtime/helpers/classCallCheck");
let Foo = function Foo() {
"use strict";
_classCallCheck(this, Foo);
};