1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Why `ng build` writes information to error log

Discussão em 'Angular' iniciado por Lorenz Pfisterer, Junho 15, 2025.

  1. When I run for example a production build ng build --configuration production, then angular writes some information to the error log:

    - Generating browser application bundles (phase: setup)...
    ✔ Browser application bundle generation complete.
    ✔ Browser application bundle generation complete.
    - Copying assets...
    ✔ Copying assets complete.
    - Generating index html...
    ✔ Index html generation complete.


    The rest of the information is written to the standard log:

    Initial chunk files | Names | Raw size | Estimated transfer size
    main.72ca292f8e263fb1.js | main | 932.38 kB | 192.44 kB
    styles.27fcf7fbc7060819.css | styles | 87.92 kB | 9.32 kB
    polyfills.033b0ddba07ded8a.js | polyfills | 33.42 kB | 10.83 kB
    runtime.76aa7a1b3ccad887.js | runtime | 3.02 kB | 1.45 kB

    | Initial total | 1.03 MB | 214.05 kB

    Lazy chunk files | Names | Raw size | Estimated transfer size
    604.7a92aba1f690ea24.js | module-a-module | 20.59 kB | 4.94 kB
    649.ec93606de2d2b011.js | module-b-module | 18.05 kB | 4.79 kB
    common.fa9b6bffd109eaa4.js | common | 12.07 kB | 3.15 kB
    295.7fd90ac08182d01c.js | module-c-module | 10.53 kB | 2.74 kB

    Build at: 2024-05-08T08:39:20.285Z - Hash: 8f846dd1da30fa34 - Time: 4153ms
    Done in 5.29s.


    Why it writes the first lines to error log? Is there a way to adjust this?

    Update

    Actually it only writes to error log, when it is executed with a maven build:

    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.6.0</version>
    </plugin>


    I think the problem is due to the handling of the log statements in exec-maven-plugin.

    Continue reading...

Compartilhe esta Página