Skip to content

Commit 516fd31

Browse files
committed
fix: handle correctly the situation when the compilation hash is the same as the previous one
Currently CLI considers the hash that is the same as the previous as invalid and this way the application is restarted on device. As that hash is already handled, we should consider it as a valid hash. Steps to reproduce : ``` `tns create ts_proj` - choose ts tabs project npm i tns-core-modules@rc --save --save-exact npm i nativescript-dev-webpack@rc --save-dev --save-exact node_modules/.bin/update-ns-webpack --deps –configs tns run android Change something in app.android.scss - the change is applied, no restart Change something in app.ios.scss - application restarts ```
1 parent 5115f07 commit 516fd31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/services/webpack/webpack-compiler-service.ts

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
4646
return;
4747
}
4848

49+
// the hash of the compilation is the same as the previous one
50+
if (this.expectedHashes[platformData.platformNameLowerCase] === message.hash) {
51+
return;
52+
}
53+
4954
let result;
5055

5156
if (prepareData.hmr) {

0 commit comments

Comments
 (0)