question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HMR with typescript template

See original GitHub issue

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...

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:6
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
manijakcommented, Jul 20, 2019

Issue present with NS6.0 and 2.3.0 as well. App does not refresh at all.

4reactions
juanbonosocommented, Apr 15, 2020

Is there any solution yet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

cra-template-typescript-hmr - npm
This is a TypeScript template with hot module reloading support, for Create React App.. Latest version: 1.0.9, last published: 2 years ago.
Read more >
vikpe/react-webpack-typescript-starter - GitHub
Minimal starter with hot module replacement (HMR) for rapid development. ... vikpe / react-webpack-typescript-starter Public template.
Read more >
TypeScript project with Webpack and HMR
Short and simple intro to bootstrapping a clean TypeScript project from the ground up.
Read more >
React setup with Typescript, Webpack 5, SSR, Code Splitting ...
React setup with Typescript, Webpack 5, SSR, Code Splitting, and HMR. Firstly, you need to set up a React application using npx ...
Read more >
Set up a React project with Typescript, Hot reload and Webpack
This project will include the support of Typescript and Hot reload. ... plugins: [new HtmlWebpackPlugin({ template: "public/index.html", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found