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

Webpack HMR Support #716

Closed
gregoryagu opened this issue Aug 23, 2017 · 6 comments
Closed

Webpack HMR Support #716

gregoryagu opened this issue Aug 23, 2017 · 6 comments
Labels

Comments

@gregoryagu
Copy link

Is HMR now supported with Webpack 3 support?

I created a test project with VS17+aspnetcore 2.0+ webpack. It does automatically pack on detected changes, but the changes don't show up on the browser.

I asked this question on S.O. here

I'm submitting a feature request

  • Library Version:
    major.minor.patch-pre

Please tell us about your environment:

  • Operating System:
    Windows 7

  • Node Version:
    6.2.0

  • NPM Version:
    3.8.9

  • Browser:
    Chrome

  • Language:
    TypeScript

Current behavior:
The webpack bundles are automatically recompiled on changes, but the changes don't propagate to the browser.

Expected/desired behavior:

HMR Support

  • What is the expected behavior?
    Automatic updates in the Browser without refresh

  • What is the motivation / use case for changing the behavior?
    Ease/speed of developement

@avrahamcool
Copy link
Contributor

avrahamcool commented Aug 23, 2017

inspecting the cli code, to get it to work you should set "hmr": true in aurelia.json under platform.
and call au run --hmr --watch.

edit: it fails to update my html (although the console shows me that hmr is active by listing all the changes I make)

edit2: I think this works when you actually use more than 1 module.
changes in the app.html only were not reflected back to the browser.

@gregoryagu
Copy link
Author

This works for me as long as I use Chrome. Thanks very much. How to run HMR should be include be included in the docs somewhere as it's a pretty cool feature.

@gregoryagu
Copy link
Author

I am closing this as resolved.

@mzvast
Copy link

mzvast commented Oct 13, 2017

It will do a full reload rather than do a hmr when using au run --watch --hmr.
So It's still broken as I can see.
In angular-cli there seems to need extra code to make it work. link

with --watch --hmr:

  • .ts(changed) ==> .js(changed) ==> reload

with --hmr:

  • .ts(changed) ==> nothing changed x==> no hmr nor reload

@kayle
Copy link

kayle commented Jan 15, 2018

@JeroenVinke should this be reopened for the open issue described above? or create a new issue? It's unfortunate that hmr is broken for app.html.

edit2: I think this works when you actually use more than 1 module.
changes in the app.html only were not reflected back to the browser.

@JeroenVinke
Copy link
Collaborator

@kayle I believe this issue is relevant: aurelia/hot-module-reload#9. It’s not something we can fix in the CLI so the hmr repo seems like the best place

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

No branches or pull requests

5 participants