NativeScript / nativescript-dev-webpack

A package to help with webpacking NativeScript apps.
Apache License 2.0
97 stars 49 forks source link

fix: stop ignoring the initial hot updates #1081

Closed DimitarTachev closed 4 years ago

DimitarTachev commented 4 years ago

PR Checklist

What is the current behavior?

The initial app start is not calling the core modules' __onLiveSync method as it expects that the changes are already applied. However, the HMR updates and the app start are asynchronous and when the app starts before the Hot Updates, the core modules are never updated.

What is the new behavior?

We always call the core modules' __onLiveSync in order to ensure that the hot updates will affect the app state.

Related to: https://github.com/NativeScript/worker-loader/issues/41 https://github.com/NativeScript/nativescript-dev-webpack/issues/1082