From 03080cfb23e6117ea59a226cb5254e8620e68a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 5 May 2025 16:32:21 +0200 Subject: [PATCH] resolve custom baseUrl to an absolute path pointing to the project root --- packages/babel-compiler/babel-compiler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index aaec42177c..9824821746 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -153,6 +153,11 @@ BCp.initializeMeteorAppSwcrc = function () { lastModifiedSwcConfigTime = currentLastModifiedConfigTime; lastModifiedSwcConfig = getMeteorAppSwcrc(); + // 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); }