简体   繁体   中英

Angular CLI 10 ng build --prod emits empty lines

When building angular app using CLI if we use ng build --prod it will emit 2 empty lines, and if I remove --prod , these empty lines are gone.

在此处输入图像描述

On my dev environment, it's very minor but when I am trying to build app via TFS these empty lines causing build failure .

在此处输入图像描述

My application is new application created with ng new <appname>

Environment Details:-

Angular CLI: 10.0.5
Node: 12.18.1
OS: win32 x64

Angular: 10.0.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.5
@angular-devkit/build-angular     0.1000.5
@angular-devkit/build-optimizer   0.1000.5
@angular-devkit/build-webpack     0.1000.5
@angular-devkit/core              10.0.5
@angular-devkit/schematics        10.0.5
@angular/cli                      10.0.5
@ngtools/webpack                  10.0.5
@schematics/angular               10.0.5
@schematics/update                0.1000.5
rxjs                              6.5.5
typescript                        3.9.7
webpack                           4.43.0

How to remove these empty lines.. any idea?

This issue is not occurring in Angular CLI: 7.1.4

Seems like issue in Angular CLI, created issue in github

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM