Skip to content

No way to prevent angular-cli from removing license info from minified JS #15890

Closed
@DanKing123

Description

@DanKing123

I believe this is a bug, although it's also possible that I've misunderstood the intended current behaviour and that this is in fact a feature request.

According to @IgorMinar in this comment:

It is customary to preserve licensing information in application bundles in the form of js comments marked with @license js doc and that's what Angular CLI does. We currently don't offer a way to omit the inclusion of these headers in the application bundles.

This is not the behaviour I am observing however. When I run ng build --prod using Angular CLI version 8.3.6, all third party license info is removed from the resulting minified JavaScript bundles and placed in 3rdpartylicenses.txt.

If I run the same command with --extractLicenses=false, the license info is still removed, but 3rdpartylicenses.txt is not created.

There doesn't seem to be any way to prevent Angular CLI from removing this license information from the JS that I am going to be serving in my application.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions