Skip to content

localization retains copyright in minimized main.js #17497

@sdavids

Description

@sdavids

🐞 bug report

Affected Package

@angular/localize

Description

When using @angular/localize the Google license will not be removed (extracted) from main.js

🔬 Minimal Reproduction

$ ng n localized --defaults
$ cd localized
$ ng add @angular/localize
$ ng build --prod --localize
$ cat dist/localized/en-US/main-es2015.somehash.js | head -n 9
var $localize=Object.assign(void 0===$localize?{}:$localize,{locale:"en-US"});
/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */
!function(n) ......

🌍 Your Environment

Angular Version:

Angular CLI: 9.1.1
Node: 13.13.0
OS: darwin x64

Angular: 9.1.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.1
@angular-devkit/build-angular     0.901.1
@angular-devkit/build-optimizer   0.901.1
@angular-devkit/build-webpack     0.901.1
@angular-devkit/core              9.1.1
@angular-devkit/schematics        9.1.1
@angular/cli                      9.1.1
@ngtools/webpack                  9.1.1
@schematics/angular               9.1.1
@schematics/update                0.901.1
rxjs                              6.5.5
typescript                        3.8.3
webpack                           4.42.0
@angular/localize 9.1.2

angular.json

{
  "projects": {
    "localized-pwa": {
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "polyfills": "src/polyfills.ts",
            "aot": true,
...
          },
          "configurations": {
            "production": {
              "optimization": true,
              "outputHashing": "all",
              "extractCss": true,
              "namedChunks": false,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
...
            }
          }
        }
      }
...
    }},
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions