2

I tried a lot of stuff the last days and am very very thankful, if you could point me in the right direction on what I could try next.

My current status:

  • I have a running Angular application that is served via docker-compose with a bunch of other services.
  • I use docker-compose in prod and dev for a while now and never had bigger problems.
  • I had to update my application from Angular 11 to Angular 12 and after that had to resolve quite a few dependency conflicts.
  • I have configured the angular.json manually to Angular 12 format and rechecked it multiple times.
  • My Angular application is working in prod and dev builds.

Now my problem:

  • Since updating Angular from 11 to 12 automatic recompiling (inside of docker-container) after code changes is taking up to 2 minutes (before just a few seconds). This makes fast iterations impossible for me. So I would love to have it fast again!

A few background infos:

  • In my docker-compose file I mounted volumes for app-code and node-modules. I know that volumes can slow everything down, but: It worked perfectly fast before updating my application to Angular 12.
  • The app is served via ng serve --host 0.0.0.0 --disable-host-check --port 3000 --poll 100.
  • The app is recompiling very fast after changes, when using ng serve outside of a docker container.
  • I am using Docker for Windows on Win 10 with WSL2 integration.

If you need more info, I am more than glad to provide it. Thank you so much in advance and sorry for any bad english as I am not a native speaker.

Tom

Edit: The build command (ng serve...) as well as the docker & docker-compose configuration did not change. The only thing that got changed for my development build where the following devDependencies in my package.json file: enter image description here

Tom
  • 89
  • 6
  • https://github.com/angular/angular-cli/issues/17017 may be this link can help – Kumail Hussain Sep 28 '21 at 18:52
  • 1
    @KumailHussain Thank you for your link! I already stumbled over it, when I was googling for my issue and unfortunately it did not help. My problem is really focused on the recompile after code changes. Initial build time did not increase. – Tom Sep 28 '21 at 19:04
  • @Tom could you share a minimal example of your setup or some more insight to at least the build commands that used to be faster an now are not? – SolvedForHome Oct 07 '21 at 12:13
  • @SolvedForHome --> please see "edit" of the original question. – Tom Oct 07 '21 at 15:01

0 Answers0