Skip to content

Commit 88f0b4f

Browse files
committed
fix(livesync): stop forcing native prepare when using --bundle
These checks are no longer needed. They also cause the CLI to rebuild the .aar files on every change when using `tns run android --bundle`. - The first check: The CLI watches the `App_Resources` folder and will execute the logic for preparing them whenever there's a change. - The second check: The CLI will try to detect changes in node_modules by comparing the timestamps of every file there on every change. When there's a change, it will set the `modulesChanged` flag to true. Therefore, the `bundle` flag is not needed. fixes #3707
1 parent dbe20cd commit 88f0b4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/services/prepare-platform-native-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ export class PreparePlatformNativeService extends PreparePlatformService impleme
2626
await this.cleanProject(config.platform, config.appFilesUpdaterOptions, config.platformData, config.projectData);
2727
}
2828

29-
if (!config.changesInfo || config.changesInfo.changesRequirePrepare || config.appFilesUpdaterOptions.bundle) {
29+
if (!config.changesInfo || config.changesInfo.changesRequirePrepare) {
3030
this.prepareAppResources(config.platformData, config.projectData);
3131
await config.platformData.platformProjectService.prepareProject(config.projectData, config.platformSpecificData);
3232
}
3333

34-
if (!config.changesInfo || config.changesInfo.modulesChanged || config.appFilesUpdaterOptions.bundle) {
34+
if (!config.changesInfo || config.changesInfo.modulesChanged) {
3535
await this.$pluginsService.validate(config.platformData, config.projectData);
3636

3737
const appDestinationDirectoryPath = path.join(config.platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME);

0 commit comments

Comments
 (0)