mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
ensure proper build mode for cordova
This commit is contained in:
@@ -43,7 +43,7 @@ const {
|
||||
|
||||
const {
|
||||
setupCompilationTracking,
|
||||
waitForFirstCompilation
|
||||
waitForFirstCompilation,
|
||||
} = require('./lib/compilation');
|
||||
|
||||
const {
|
||||
@@ -62,6 +62,7 @@ const {
|
||||
isMeteorAppProduction,
|
||||
isMeteorAppDebug,
|
||||
isMeteorAppConfigModernVerbose,
|
||||
isMeteorAppNative,
|
||||
} = require('meteor/tools-core/lib/meteor');
|
||||
|
||||
const {
|
||||
@@ -123,7 +124,7 @@ if (isMeteorAppRun() || isMeteorAppBuild() || isMeteorAppTest()) {
|
||||
} = setupCompilationTracking();
|
||||
|
||||
// For 'run' command, start Rspack in appropriate modes with distinct callbacks
|
||||
if (isMeteorAppDevelopment()) {
|
||||
if (isMeteorAppDevelopment() || !isMeteorAppNative()) {
|
||||
startRspackClientServe({ onCompile: onCompileClient });
|
||||
startRspackServerWatch({ onCompile: onCompileServer });
|
||||
} else if (isMeteorAppProduction()) {
|
||||
|
||||
@@ -183,6 +183,32 @@ export function isMeteorAppTestWatch() {
|
||||
return isMeteorAppTest() && !Package?.meteor?.global?.currentCommand?.options?.once;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current Meteor current command is running Android.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isMeteorAppNativeAndroid() {
|
||||
return Package?.meteor?.global?.currentCommand?.options?.['android-device'] ||
|
||||
Package?.meteor?.global?.currentCommand?.options?.['android'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current Meteor current command is running iOS.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isMeteorAppNativeIos() {
|
||||
return Package?.meteor?.global?.currentCommand?.options?.['ios-device'] ||
|
||||
Package?.meteor?.global?.currentCommand?.options?.['ios'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current Meteor command is running native.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isMeteorAppNative() {
|
||||
return isMeteorAppNativeAndroid() || isMeteorAppNativeIos();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the Meteor application is running in development mode.
|
||||
* @returns {boolean} True if the application is in development mode, false otherwise.
|
||||
|
||||
Reference in New Issue
Block a user