From f185e052a2e3fd00647d558be85f091660ec155f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 25 Aug 2025 16:14:16 +0200 Subject: [PATCH] ensure proper build mode for cordova --- packages/rspack/lib/build-context.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/rspack/lib/build-context.js b/packages/rspack/lib/build-context.js index f7ad325079..06cc6c4cc1 100644 --- a/packages/rspack/lib/build-context.js +++ b/packages/rspack/lib/build-context.js @@ -17,6 +17,7 @@ const { isMeteorAppRun, isMeteorAppBuild, isMeteorBlazeProject, + isMeteorAppNative, } = require('meteor/tools-core/lib/meteor'); const { @@ -95,7 +96,10 @@ export function ensureRspackBuildContextExists() { export function ensureModuleFilesExist() { const appDir = getMeteorAppDir(); - const env = isMeteorAppDevelopment() ? { isDevelopment: true } : { isProduction: true }; + const env = { + ...(isMeteorAppDevelopment() ? { isDevelopment: true } : { isProduction: true }), + isNative: isMeteorAppNative(), + }; const commandRole = isMeteorAppRun() ? { role: FILE_ROLE.run } : isMeteorAppBuild() @@ -428,7 +432,9 @@ import '../../${config?.entryFile}';`; } if (config?.outputFile && - (role === FILE_ROLE.build || config?.isProduction || + (role === FILE_ROLE.build || + config?.isProduction || + config?.isNative || (role === FILE_ROLE.run && (config?.isServer || config?.isTest)))) { return `/* Link to ⚡ Rspack ${capitalizeFirstLetter(side)} App */ ${