Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR not working consistently #351

Closed
subvertallchris opened this issue Oct 31, 2016 · 8 comments
Closed

HMR not working consistently #351

subvertallchris opened this issue Oct 31, 2016 · 8 comments

Comments

@subvertallchris
Copy link

subvertallchris commented Oct 31, 2016

Sorry for the vague title but I'm having trouble capturing it concisely. Basically, I'm finding that the loader does not hot reload content when I expect it to, though if I move back to awesome-ts-loader, it does. For example, changing some text in a tsx file will result in a complete reload with ts-loader, but awesome-ts-loader correctly hot reloads. I'd like to use this library instead of the other, since they seem to have stopped updating regularly, but all the reloads are pretty disruptive.

I'm using TS 2.0.6 and ts-loader 0.9.5, though I found this problem in prior recent versions, as well. I'm not sure where to start troubleshooting this, so please excuse me if this issue is erroneous. Happy to provide any additional information. Thanks!

@johnnyreilly
Copy link
Member

Hi @subvertallchris,

Are you sure that it was 0.9.5 that was problematic? We had a regression which was fixed with 0.9.4:

#322

@johnnyreilly
Copy link
Member

Fwiw I'm pretty sure awesome TypeScript loader is still actively supported. It's only been a month or so since the last release

@subvertallchris
Copy link
Author

Yup, I just checked again and confirmed that I am using 0.9.5. I'm not sure how to go about troubleshooting this, any recommendations?

@johnnyreilly
Copy link
Member

I would take a look at the code where we introduced and then fixed the regression. It could be worth asking @dopare

@HerringtonDarkholme
Copy link
Contributor

Hi, can you add an minimal reproduction for hot reload issue? I have found many issues say atl supports HMR not tsl and many other issues say tsl supports HMT but not atl.

@subvertallchris
Copy link
Author

Will do when I have the opportunity, sorry for the delay.

@ReDrUm
Copy link

ReDrUm commented Mar 9, 2017

FWIW It's been working fine for my team under 1.3.3 but upgrading to 2.0.1 now throws compilation typing errors when attempting to rebuild under an HMR scenario. I don't have any code i can share to reproduce it, but here's an example of a type error which certainly doesn't occur on initial builds:

error TS2322: Type 'Promise<CustomType>' is not assignable to type 'Promise<T>'.
  Type 'CustomType' is not assignable to type 'T'.

We're sticking to ts-loader 1.3.3 with TypeScript 2.2.1 at the moment.

@johnnyreilly
Copy link
Member

It's possible that this is webpack 2 rather than ts-loader related. Very little changed in the move from 1.x to 2.x in ts-loader. Mostly it was just removing support for old node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants