This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 49
HMR: Hot-updates generated for unchanged file #877
Comments
5 tasks
Acceptance criteria:
|
seems like |
By using However, |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):5.3.4
5.3.1
5.3.1
5.3.1
10.15.1
~0.21.0
Describe the bug
HMR generates hot-updates for files that are not changed.
To Reproduce
main-view-modes.ts
file multiple times to generate hot updates.Explore the generated hot-updates in
platforms/ios/testapp/app/
( thebundle.XXXX.hot-update.js
files). All of them (except the first update) contain bothmain-view-modes.ts
and./main-page.ts
.The
./main-page.ts
file wasn't changed, so it should not be re-generated and sent as a hot-update.Expected behavior
Changes should be generated only for the changed files.
Why This Is Important
In the above example trying to use
module.hot.accept(["./main-view-model"], () => { ... })
and handle view-model changes insidemain-page.ts
is not possible. Because themain-page.ts
is also included in the hot-update it's changes bubble up and cannot be handled.Possible Cause and Solution
According to ts-loader docs the
transpileOnly
flag should be enabled when using the loader with HMR.Indeed setting
transpileOnly: true
in thets-loader
resolves the issue.The text was updated successfully, but these errors were encountered: