diff --git a/CHANGELOG.md b/CHANGELOG.md index ba754c9ad8..f65a231091 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ NativeScript CLI Changelog ================ +6.4.1 (2020, February 19) +=== + +### Fixed + +* [Fixed #5251](https://github.com/NativeScript/nativescript-cli/issues/5251): External files are not livesynced + + 6.4.0 (2020, February 11) === diff --git a/lib/services/webpack/webpack-compiler-service.ts b/lib/services/webpack/webpack-compiler-service.ts index 0b353499c8..3151f8d813 100644 --- a/lib/services/webpack/webpack-compiler-service.ts +++ b/lib/services/webpack/webpack-compiler-service.ts @@ -49,11 +49,8 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp return; } - // the hash of the compilation is the same as the previous one - if (this.expectedHashes[platformData.platformNameLowerCase] === message.hash) { - return; - } - + // Persist the previousHash value before calling `this.getUpdatedEmittedFiles` as it will modify the expectedHashes object with the current hash + const previousHash = this.expectedHashes[platformData.platformNameLowerCase]; let result; if (prepareData.hmr) { @@ -78,6 +75,12 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp }; this.$logger.trace("Generated data from webpack message:", data); + + // the hash of the compilation is the same as the previous one and there are only hot updates produced + if (data.hasOnlyHotUpdateFiles && previousHash === message.hash) { + return; + } + if (data.files.length) { this.emit(WEBPACK_COMPILATION_COMPLETE, data); } diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index b86b4a63af..6c5d819382 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "nativescript", - "version": "6.4.0", + "version": "6.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d8c9135c4e..8dad9ce3ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nativescript", "preferGlobal": true, - "version": "6.4.0", + "version": "6.4.1", "author": "Telerik ", "description": "Command-line interface for building NativeScript projects", "bin": {