This commit is contained in:
Nicolò Ribaudo 2022-01-11 23:53:06 +01:00 committed by GitHub
parent db08d945d0
commit 928f06ca99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ function initialize(babel) {
exports.getEnv = babel.getEnv;
if (!process.env.BABEL_8_BREAKING) {
exports.loadOptionsSync = babel.loadOptionsSync;
exports.OptionManager = babel.OptionManager;
exports.transformSync = babel.transformSync;
}
}

View File

@ -78,7 +78,7 @@ exports.transform = async function (input, filename) {
if (!process.env.BABEL_8_BREAKING) {
exports.transformSync = function (input, filename) {
const opts = babel.loadOptions({
const opts = new babel.OptionManager().init({
// sourceRoot can be overwritten
sourceRoot: path.dirname(filename) + path.sep,
...cloneDeep(transformOpts),