From 7e0f051472c2eafcca3d883fd6cfb8dffeb439b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 19:46:03 +0200 Subject: [PATCH] ensure to resolve the baseUrl properly on setup --- packages/babel-compiler/babel-compiler.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index a4cb28a7f7..94eea4120c 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -147,11 +147,6 @@ BCp.initializeMeteorAppSwcrc = function () { lastModifiedSwcConfigTime = currentLastModifiedConfigTime; lastModifiedSwcConfig = getMeteorAppSwcrc(swcFile); - // Resolve custom baseUrl to an absolute path pointing to the project root - if (lastModifiedSwcConfig.jsc && lastModifiedSwcConfig.jsc.baseUrl) { - lastModifiedSwcConfig.jsc.baseUrl = path.resolve(process.cwd(), lastModifiedSwcConfig.jsc.baseUrl); - } - if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose) { logConfigBlock('SWC Config', lastModifiedSwcConfig); } @@ -333,6 +328,11 @@ BCp.processOneFileForTarget = function (inputFile, source) { this.modifyConfig(swcOptions, inputFile); } + // Resolve custom baseUrl to an absolute path pointing to the project root + if (swcOptions.jsc && swcOptions.jsc.baseUrl) { + swcOptions.jsc.baseUrl = path.resolve(process.cwd(), swcOptions.jsc.baseUrl); + } + return swcOptions; }; @@ -380,7 +380,6 @@ BCp.processOneFileForTarget = function (inputFile, source) { .join('-'); // Determine if SWC should be used based on package and file criteria. const shouldUseSwc = !shouldSkipSwc && !this._swcIncompatible[cacheKey]; - console.log("--> (babel-compiler.js-Line: 383)\n shouldUseSwc: ", shouldUseSwc); let compilation; try { let usedSwc = false;