Skip to content

ClassExpression in ES2015 builds produces larger bundles #14577

Closed
@alan-agius4

Description

@alan-agius4

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

No, but now it effects more users as differential loading is on by default.

Description

TypeScript ClassExpression are not being treeshaken away.

Example codes:

let AggregateColumnDirective = class AggregateColumnDirective {
    constructor(viewContainerRef) {
    }
};
AggregateColumnDirective = __decorate([
    Directive({
        selector: 'ejs-grid>e-aggregates>e-aggregate>e-columns>e-column',
        inputs: input$1,
        outputs: outputs$1,
        queries: {}
    }),
    __metadata("design:paramtypes", [ViewContainerRef])
], AggregateColumnDirective);
let ChipList = class ChipList extends Component {
  constructor(options, element) {
        super(options, element);
    }
};
__decorate$4([
    Property([])
], ChipList.prototype, "chips", void 0);
ChipList = __decorate$4([
    NotifyPropertyChanges
], ChipList);

🌍 Your Environment


Angular CLI: 8.0.0
Node: 11.0.0
OS: win32 x64
Angular: 8.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0
@angular-devkit/build-angular     0.800.0
@angular-devkit/build-optimizer   0.800.0
@angular-devkit/build-webpack     0.800.0
@angular-devkit/core              8.0.0
@angular-devkit/schematics        8.0.0
@ngtools/webpack                  8.0.0
@schematics/angular               8.0.0
@schematics/update                0.800.0
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?

#14263

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions