Skip to content

Feature request: css hot replacement #6381

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
jurgen-reconcept opened this issue May 19, 2017 · 14 comments
Closed

Feature request: css hot replacement #6381

jurgen-reconcept opened this issue May 19, 2017 · 14 comments
Labels
area: @angular-devkit/build-angular feature Issue that requests a new feature
Milestone

Comments

@jurgen-reconcept
Copy link

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Desired functionality.

Is there any chance hot replacement of updated CSS is going to be implemented in the cli? I'm using Ionic 2 for a different project, which has this feature. I think it's really useful to not have the whole application rebuilt and especially reloaded.

Say for example I am trying to style a particular element in a modal window that takes a few clicks to navigate to and open, it's really annoying to have to do this every time I make a small Sass adjustment.

@Brocco Brocco added the P5 The team acknowledges the request but does not plan to address it, it remains open for discussion label May 19, 2017
@Brocco Brocco self-assigned this May 19, 2017
@shyamal890
Copy link

shyamal890 commented Feb 6, 2018

Frankly, I believe this is a Must Have feature and not Nice to have. Imagine your component requires 2-4 secs to load and with a minor change in css the browser tab is refreshed! This is why Ionic guys had to come up with a way to update css without reloading the app.

@hansl hansl unassigned Brocco Feb 6, 2018
@cmaart
Copy link

cmaart commented Apr 19, 2018

This "nice-to-have"-ticket is a deal breaker for lot of designers out there to work directly within an angular project which as a result creates huge overhead for working with them

@ewohlken
Copy link

ewohlken commented May 9, 2018

My angular project has grown to a point where front end development is severely impaired by the rebuild times after updating css. From a front-end perspective this is definitely a must have for any large project

@herkulano
Copy link

herkulano commented May 19, 2018

@StephenFluin in ng-conf you asked for feedback from designers.

This is the number one problem with angular from a designer's perspective.

Although there's some HMR support, it's half-baked into the CLI and not fully supported out-of-the-box like vue-cli for example.

The current story for HRM is broken because it's relying on a mostly dead project and the implementation is cumbersome, especially with support for state management libraries like ngrx or ngxs.

The HMR implementation should be as simple as setting a flag or config in the CLI and hooking it up to the store.

Related issues:
https://github.com/angular/angular/issues/11942
#10268
PatrickJS/angular-hmr#74

@BenRacicot
Copy link

BenRacicot commented Jul 21, 2018

This is my #1 request for the Angular team. HMR and hot CSS is something I've come to depend on and miss it when working on Angular projects. Is there anything I can do to help get this more attention?

@Rush
Copy link

Rush commented Oct 2, 2018

Let me add my support too. Who should we send the beer to? I actually care more about `ngtools/webpack' but I'm sure having it in CLI will help

@BenRacicot
Copy link

@Rush Same! I'd throw down my share for this to become a feature. I reached out to the guys who build Prepros. He said he'd take a look.

@mbritton
Copy link

I would PayPal one hundred bucks to the developer who checked this functionality in, with unit tests.

@stephengardner
Copy link

I would PayPal another hundred bucks. So make that $200 from @mbritton and I. I'll give it 30 days.

@pauldraper
Copy link

pauldraper commented Jul 10, 2019

Not as slick as a CSS-only option, but https://github.com/wags1999/angular-hmr-lazy-components seems to work.

@filipesilva filipesilva added area: @angular-devkit/build-angular feature Issue that requests a new feature and removed P5 The team acknowledges the request but does not plan to address it, it remains open for discussion labels Oct 1, 2019
@ngbot ngbot bot modified the milestone: Backlog Oct 1, 2019
@hiepxanh
Copy link
Contributor

Hello everybody

Description

I belive that fast edit style can help us so much. Currently we need to wait 1-3s to reload the application to update the style. I belive we can do this faster (apply style realtime).

I have a plugin that allow us to do that. It's emit change base on vscode extention to chrome extention. Fast reload without reload all application https://www.youtube.com/watch?v=W-hWhR5GX_c&t=1s
But this is not enough.

Describe the solution you'd like

I have header.scss and footer.scss, which were imported by styles.scss. I would like to update footer.scss then reflect on browser without rebuild. So I guest I have to rebuild all scss tree. Can we do that? How I can do that?

Describe alternatives you've considered

I don't know. Angular team can me give some instruction that can guide me to interactive with built-in tool. Then I will do it myself.

anyone can help me contact to angular team, I will really be appreciate this.

@mbritton @stephengardner can you check this out? https://github.com/xanhtool/SnapCss

@alan-agius4
Copy link
Collaborator

Closing as this should work out-of-the-box when using Angular CLI version 11.

If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.

@Rush
Copy link

Rush commented Oct 21, 2020

What about non CLI? How to configure it with ngtools/webpack?

@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 Nov 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/build-angular feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests