Skip to content

Complete webpack build after every change #2414

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
hemantjadon opened this issue Sep 29, 2016 · 12 comments
Closed

Complete webpack build after every change #2414

hemantjadon opened this issue Sep 29, 2016 · 12 comments
Labels
needs: more info Reporter must clarify the issue

Comments

@hemantjadon
Copy link

hemantjadon commented Sep 29, 2016

OS

Mac OSX El Capitan
os : darwin x64

Versions.

angular-cli: 1.0.0-beta.15
node: 4.4.5

Repro steps.

  • Slow compilation of styles and template files
  • Each time a file changes the complete Webpack build runs, which consumes time.

Other details that might be useful.

  • The normal compilation using typescript compiler and gulp or grunt helps to speed up the compilation of styles and templates, speeding up the development process.
  • There should be a flag in ng serve which builds only the changed part of the code
  • There might be such an option which I don't know or not documented.
  • [Edit] : There can be something like Hot module replacement, only for styles and templates if not complete.
@denkomanceski
Copy link

+1

@celliott181
Copy link
Contributor

celliott181 commented Sep 29, 2016

This is listed as a high priority for RC1 (https://github.com/angular/angular-cli/milestone/1). It's a well known issue that the team is working on.

@hemantjadon
Copy link
Author

hemantjadon commented Sep 30, 2016

Is there any workaround for this issue right now for faster development ?

@filipesilva
Copy link
Contributor

We already do incremental builds, that's included by default in webpack. What makes you say that everything is recompiled?

@filipesilva filipesilva added the needs: more info Reporter must clarify the issue label Oct 5, 2016
@denkomanceski
Copy link

denkomanceski commented Oct 5, 2016

I think the css assets are the ones that make this problem... the development is really slow.. we have to wait like 5 seconds before a refresh maybe even more.. I think the assets folder is big (with icons, svgs, csses) and this folders slows the whole refresh for some reason. I can send a .gif to see what is happening

Here is a gif:
gif

The terminal is running as administrator since there is a known issue that its slower if its not

But I think that this issue is a duplicate of #1980 which is put as a priority for rc1 so I assume it can be closed

@hemantjadon
Copy link
Author

It is also pretty slow even when assets folder is not very large. I think it is due to the complete rebuild of whole project even when changes are only in one file. I don't know that it is a desired behavior or not but for fast template and css editing it hampers development speed alot.

But as it is duplicate of #1980 and is a milestone for RC it can be closed

@hemantjadon
Copy link
Author

hemantjadon commented Oct 7, 2016

The task which I recently noticed taking the most time is chunk asset optimization and asset optimization. Will upload a screenshot soon.

Screen shot :
screen shot 2016-10-07 at 7 09 57 pm

@filipesilva
Copy link
Contributor

@hemantjadon, unless there's something really wrong, there is no so thing as a full rebuild. Compare the total time of your first build with your rebuild, the rebuild should be faster.

That being said, there are reports of builds just being slow. For that, see #1980

@masaanli
Copy link

Having a big project and a fast pc. And the Building times are 16 seconds...

@hemantjadon
Copy link
Author

@filipesilva You are right that the incremental compilation is done the first build takes about 14-15s but the rebuilds take 5-6s, though the rebuilds are faster than initial builds, but i think it doesn't solve the exact problem, when i change slight bit in styles or templates i have to wait 5s every time before i can see my changes, I think it decreases the speed a lot.

I mean angular-cli was meant to increase the development speed, and it does in initialisation of the project and the boilerplate code, but rebuilds are slow and the waiting after the change to be reflected is quite painful

@masaanli
Copy link

First time is slower than the rebuilds. Here stated, my initial build is taking 60 seconds. And the rebuild time itself is 16 seconds.

@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

5 participants