Skip to content

Commit 8ddf8c0

Browse files
committed
fix(livesync): check node_modules for changes only with --sync-all-files
fixes #3710
1 parent dbe20cd commit 8ddf8c0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/services/project-changes-service.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ export class ProjectChangesService implements IProjectChangesService {
7070
const platformResourcesDir = path.join(projectData.appResourcesDirectoryPath, platformData.normalizedPlatformName);
7171
this._changesInfo.appResourcesChanged = this.containsNewerFiles(platformResourcesDir, null, projectData);
7272
/*done because currently all node_modules are traversed, a possible improvement could be traversing only the production dependencies*/
73-
this._changesInfo.nativeChanged = this.containsNewerFiles(
74-
path.join(projectData.projectDir, NODE_MODULES_FOLDER_NAME),
75-
path.join(projectData.projectDir, NODE_MODULES_FOLDER_NAME, "tns-ios-inspector"),
76-
projectData,
77-
this.fileChangeRequiresBuild);
73+
this._changesInfo.nativeChanged = projectChangesOptions.skipModulesNativeCheck ?
74+
false :
75+
this.containsNewerFiles(
76+
path.join(projectData.projectDir, NODE_MODULES_FOLDER_NAME),
77+
path.join(projectData.projectDir, NODE_MODULES_FOLDER_NAME, "tns-ios-inspector"),
78+
projectData,
79+
this.fileChangeRequiresBuild);
7880

7981
if (this._newFiles > 0 || this._changesInfo.nativeChanged) {
8082
this._changesInfo.modulesChanged = true;

0 commit comments

Comments
 (0)