Skip to content

ng build --dev vs ng build --prod : Why is prod build larger? #3239

@lebsral

Description

@lebsral

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Mac OSX 10.12.1

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.20-4
node: 7.1.0
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
ng new testing
cd testing
ng build --dev

size of dist folder is 5.1mb

ng build --prod

size of dist folder is now 6.8mb.

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Why does the prod build produce a larger dist folder? Isn't it doing tree shaking and uglification?

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