Skip to content

HMR with typescript template #518

Closed as not planned
Closed as not planned
@7ammer

Description

@7ammer

Version

2.2.2

Reproduction link

Just install the default typescript template

Platform and OS info

Android / nativescript 5.4.2

Steps to reproduce

Install typescript version.

Run npm run android --hmr.

Edit the 'msg' value in the App.vue file.

What is expected?

It hot replaces the 'msg' text without reloading the app.

What is actually happening?

The app reloads.


It looks like it can't HMR because it doesn't understand .ts files.

Entrypoint bundle = vendor.js bundle.js bundle.e49b2d08df57ef87e52d.hot-update.js
[./ sync ^\.\/app\.(css|scss|less|sass)$] . sync nonrecursive ^\.\/app\.(css|scss|less|sass)$ 175 bytes {bundle} [built]
[./ sync recursive (root|page)\.(xml|css|js|ts|scss)$] . sync (root|page)\.(xml|css|js|ts|scss)$ 160 bytes {bundle} [built]
[./main.ts] 2.54 KiB {bundle} [built]
      179 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Successfully transferred bundle.e49b2d08df57ef87e52d.hot-update.js on device emulator-5554.
Successfully transferred e49b2d08df57ef87e52d.hot-update.json on device emulator-5554.
JS: HMR: Checking for updates to the bundle with hmr hash e49b2d08df57ef87e52d.
JS: HMR: Ignored an update to unaccepted module: 
JS: HMR:          ➭ ./main.ts
JS: HMR: Cannot apply update with hmr hash e49b2d08df57ef87e52d.
JS: HMR: Aborted because ./main.ts is not accepted
JS: Update propagation: ./main.ts
Refreshing application on device emulator-5554...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions