Skip to content

Hot reloading #298

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

Closed
doczoidberg opened this issue Mar 12, 2016 · 9 comments
Closed

Hot reloading #298

doczoidberg opened this issue Mar 12, 2016 · 9 comments

Comments

@doczoidberg
Copy link

I am not sure if this is the right project asking for it but is something like react's hot reloading possible with Angular 2 + Webpack? I don't think is possible by Angular`s design?

Edit: the mentioned project is replaced by babel-plugin-react-transform.
More Information here

@filipesilva
Copy link
Contributor

Hm.... I know webpack has hot reload, but I get the feeling the functionality described in your links is more advanced than this.

A better place to ask is https://github.com/angular/angular, I think.

@zackarychapple
Copy link
Contributor

I agree with @filipesilva that this is better asked on Core, however depending on what happens there we might need to make adjustments as well.

@doczoidberg
Copy link
Author

seems that this is a webpack configuration issue?

https://webpack.github.io/docs/hot-module-replacement-with-webpack.html

so this is the right place for my question

@filipesilva
Copy link
Contributor

Hot module replacement as provided by webpack allows an app to reload a module/file on the fly. That bit is definitely a configuration feature.

However, the way by which the application responds to having modules being reloaded is an app/framework issue.

In the case of react, the hot reload behaviour seems to have been achieved via heavy instrumentation of components. This makes sense, because their state needs to somehow be persisted and re-introduced on the newly reloaded components.

I am not aware of such an angular feature, but there might be something to it if you ask on the angular repo. The CLI could perhaps have webpack's hot reload, but it wouldn't do much on it's own.

@doczoidberg
Copy link
Author

Here is a boilerplate with HMR enabled. It does not save the state when hot reloading.

This is a store specific thing? Can this be solved by using RxJs?

@doczoidberg
Copy link
Author

nice article: http://blog.mgechev.com/2015/10/26/angular2-hot-loader-hot-loading-tooling

to sum up: it works with architecture considerations or it needs additional tools which patch the components without reinitiializing them.

Are there any angular tooling repositories? I think it's time to get the right tools for angular 2 now.

@filipesilva
Copy link
Contributor

I am not aware of any, but have not really looked at it. Would love to hear about it if you find them!

@vladwulf
Copy link

You can find the angular2-cli friendly seed with redux and hot reloading here.
https://github.com/VladWulf/angular2-redux-hmr-boilerplate

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants