Skip to content

Decorator stripping for app code no longer working in 1.5.0-rc.0 #8050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
IgorMinar opened this issue Oct 13, 2017 · 2 comments · Fixed by #8077
Closed

Decorator stripping for app code no longer working in 1.5.0-rc.0 #8050

IgorMinar opened this issue Oct 13, 2017 · 2 comments · Fixed by #8077
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@IgorMinar
Copy link
Contributor

IgorMinar commented Oct 13, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0-rc.0
Node: 6.9.5
OS: darwin x64
Angular: 5.0.0-rc.2
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

@angular/cdk: 2.0.0-beta.12
@angular/cli: 1.5.0-rc.0
@angular/material: 2.0.0-beta.12
@angular/service-worker: 1.0.0-beta.16
@angular-devkit/build-optimizer: 0.0.27
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.33
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0-rc.0
@schematics/angular: 0.0.45
typescript: 2.5.3
webpack: 3.7.1

I tested this also with Typescript 2.4.2 and got the same result.

Repro steps.

ng new foo
cd foo
ng build --prod --build-optimizer

The log given by the failure.

no error, the app builds, but the bundle contains decorators coming from the app code.

Example:

AppComponent = tslib_es6.b([ Object(core.h)({
                selector: "aio-shell",
                templateUrl: "./app.component.html"
            }), tslib_es6.d("design:paramtypes", [ deployment_service_Deployment, document_service_DocumentService, core.j, location_service_LocationService, navigation_service_NavigationService, scroll_service_ScrollService, search_service_SearchService, toc_service_TocService ]) ], AppComponent);

Desired functionality.

All decorators in the app code should have been stripped.

Mention any other details that might be useful.

This used to work in the past.

@sarunint
Copy link
Contributor

May be duplicate of #8027? Because the CLI automatically uses AngularCompilerPlugin when Angular's major is >= 5.

@filipesilva filipesilva self-assigned this Oct 16, 2017
@filipesilva filipesilva added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix labels Oct 16, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 17, 2017
We feel build

This PR defualts `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix angular#8050
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 17, 2017
We feel build

This PR defualts `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix angular#8050
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 17, 2017
We feel build

This PR defualts `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix angular#8050
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 18, 2017
We feel build

This PR defualts `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix angular#8050
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 18, 2017
We feel build

This PR defualts `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix angular#8050
filipesilva added a commit that referenced this issue Oct 18, 2017
We feel build `--build-optimizer` is stable enough to not be experimental anymore.

This PR defaults `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix #8050
filipesilva added a commit that referenced this issue Oct 18, 2017
We feel build `--build-optimizer` is stable enough to not be experimental anymore.

This PR defaults `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix #8050
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
We feel build `--build-optimizer` is stable enough to not be experimental anymore.

This PR defaults `build-optimizer`  when using Angular 5+ on a production build with `--aot`.

It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).

Fix angular#8050
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants