aurelia / cli

The Aurelia 1 command line tool. Use the CLI to create projects, scaffold components, and bundle your app for release.
MIT License
407 stars 133 forks source link

hmr stopped working after webpack refactor in v1.1.0 #1147

Open 3cp opened 5 years ago

3cp commented 5 years ago

@Sayan751 please have a look on hmr. I tried to bring back some plugin from old run task, but could not make it work.

Sayan751 commented 5 years ago

@3cp On which skeleton you tried the HMR. I suspect that the problem might also exist even when CLI is not used. I will try to replicate the issue with the setup, you are facing problem with, without CLI.

I did a quick check and saw that the skeletons are not using the HotModuleReplacementPlugin from webpack. I used that with the navigation skeleton. Any changes in HTML are reflected via HMR w/o full reload, where any change in VM resulted in full reload. I tried to do the same with the minimum skeleton, the result was not the same, as neither changes were reflected.

As per my personal experience, the HMR in Aurelia works similar to the results found in the navigation skeleton. I need to dig deeper, but I suspect that it has nothing to do with the new refactoring. I need to verify this claim that with an earlier version of CLI though.

3cp commented 5 years ago

Thx. I only tried latest webpack skeleton, not the old one. I am not sure when was this stopped working.

Sayan751 commented 5 years ago

@3cp I mean with which combination you created the skeleton on which you tested the HMR.

BTW I have dug a bit, and I think this particular code is incorrectly binding the view with old context. And I suspect that this is the reason why the changes in VM is not reflected.

I still need to dig deeper.

3cp commented 5 years ago

I mean hmr is not working, code change triggered full reload, not hot module reload.

3cp commented 5 years ago

The old run task added a plugin for hmr mode. I tried that but it didn't change anything.

xenoterracide commented 4 years ago

hmm... with webpack on a app I created last week I'm not noticing any page content reloads https://github.com/xenoterracide/capacitor-android-issue-repro

3cp commented 4 years ago

I tried your repo, both npm start and au run worked for me with page reloads. But I don't know what's your command to run the android thing, no experience on that.

Let me know your system setup (os, browser...) if npm start didn't work for you.

xenoterracide commented 4 years ago

I suspect actually that I was noticing this while I was trying to reload on code that was failing in some way (like failing to compile) so not a real issue, nevermind.