Skip to content

angular production build - bundle is not uglified #18233

@saifabusaleh

Description

@saifabusaleh

🐞 Bug report

  • new
  • [x ] build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No

Description

I can see code (properties/functions/actual code) that is not uglified in production build

🔬 Minimal Reproduction

Github repository that its reproduced in: https://github.com/saifabusaleh/my-locations-website
Link to demo website: http://pacific-spire-36644.herokuapp.com/locations

  1. Build the bundle with npm run build
  2. Open dev tools and view the bundle of locations lazy loaded module
    I can see this code in dev tools:
                ngOnInit() {
                    this.locationName = this.route.snapshot.paramMap.get("locationName"),
                    this.locationName && this.getLocation(this.locationName)
                }
                getLocation(t) {
                    const e = this.locationService.getLocation(t);
                    e.status || (this.location = e.locations[0],
                    this.categoryName = this.location.category,
                    this.coordinate = this.location.coords)
                }
                onEditLocation() {
                    this.openLocationDialog(s.a.Edit).afterClosed().subscribe(t=>{
                        this.performUpdateLocation(t)
                    }
                    )
                }

image

🌍 Your Environment


Angular CLI: 9.0.2
Node: 12.16.3
OS: win32 x64

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

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.2
@angular-devkit/build-angular     0.900.2
@angular-devkit/build-optimizer   0.900.2
@angular-devkit/build-webpack     0.900.2
@angular-devkit/core              9.0.2
@angular-devkit/schematics        9.0.2
@angular/cdk                      9.0.0
@angular/cli                      9.0.2
@angular/flex-layout              9.0.0-beta.29
@angular/material                 9.0.0
@ngtools/webpack                  9.0.2
@schematics/angular               9.0.2
@schematics/update                0.900.2
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Anything else relevant?
Is there any option in the Angular CLI not to show function names/variables names?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions