Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/nx/src/builders/build/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ export function runBuilder(options: BuildBuilderSchema, context: ExecutorContext
nsOptions.push('--env.replace');
nsOptions.push(fileReplacements.join(','));
}
// always add --force for now since within Nx we use @nativescript/webpack at root only and the {N} cli shows a blocking error if not within the app
nsOptions.push('--force');
// always add --force (unless explicity set to false) for now since within Nx we use @nativescript/webpack at root only and the {N} cli shows a blocking error if not within the app
if (options?.force !== false) {
nsOptions.push('--force');
}
}
// console.log('command:', [`ns`, ...nsOptions, ...additionalCliFlagArgs].join(' '));
// console.log('command:', [`ns`, ...nsOptions].join(' '));
Expand Down
1 change: 1 addition & 0 deletions packages/nx/src/builders/build/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface BuildBuilderSchema extends JsonObject {
production?: boolean;
platform?: 'ios' | 'android';
copyTo?: string;
force?: boolean;
/** For running `ns prepare <platform>` */
prepare:? boolean;

Expand Down
5 changes: 5 additions & 0 deletions packages/nx/src/builders/build/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
"type": "boolean",
"default": false,
"description": "Do a full project clean"
},
"force": {
"type": "boolean",
"default": true,
"description": "If true, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring ns migrate."
}
},
"required": []
Expand Down