diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index 9341fa9c52..1327083781 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); } diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 5322a5dad0..5cae318e1f 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -332,9 +332,21 @@ function filterWebArchs(webArchs, excludeArchsOption, appDir, options) { const excludeArchs = [...excludeArchsOptions, ...automaticallyIgnoredLegacyArchs]; webArchs = webArchs.filter(arch => !excludeArchs.includes(arch)); } - return webArchs; } } + + const forcedInclArchs = process.env.METEOR_FORCE_INCLUDE_ARCHS; + if (forcedInclArchs != null) { + const nextInclArchs = forcedInclArchs.trim().split(/\s*,\s*/); + webArchs = Array.from(new Set([...webArchs, ...nextInclArchs])); + } + + const forcedExclArchs = process.env.METEOR_FORCE_EXCLUDE_ARCHS; + if (forcedExclArchs != null) { + const nextExclArchs = forcedExclArchs.trim().split(/\s*,\s*/); + webArchs = webArchs.filter(_webArch => !nextExclArchs.includes(_webArch)); + } + return webArchs; } @@ -584,7 +596,8 @@ async function doRunCommand(options) { const buildMode = options.production ? 'production' : 'development'; let cordovaRunner; - if (!_.isEmpty(runTargets)) { + const shouldDisableCordova = Boolean(JSON.parse(process.env.METEOR_CORDOVA_DISABLE || 'false')); + if (!shouldDisableCordova && !_.isEmpty(runTargets)) { async function prepareCordovaProject() { import { CordovaProject } from '../cordova/project.js'; diff --git a/tools/cli/main.js b/tools/cli/main.js index a6742e3d08..6888765ad9 100644 --- a/tools/cli/main.js +++ b/tools/cli/main.js @@ -1544,6 +1544,9 @@ makeGlobalAsyncLocalStorage().run({}, async function () { }); } + // Set the currentCommand in the global object to spread context + global.currentCommand = { name: command.name, options }; + var ret = await command.func(options, { rawOptions }); } catch (e) {