angular: Angular 5.1.0 with typescript 2.5.x does not emit extra decorators with ngc
I’m submitting a…
[ x] Bug report
Current behavior
ngc command does not emit extra decorators with Angular 5.1.0 and typescript 2.5.3
Expected behavior
it should emit decorators as it did with Angular 5.0.x and typescript 2.4.2
Minimal reproduction of the problem with instructions
create a custom typescript decorator and add this to a Angular component and try compiling using ngc. it won’t emit the custom decorator with the output. ex:
@EntryComponent({})
@Component({
selector: 'test',
template: ''
})
export class LoginComponent{
}
What is the motivation / use case for changing the behavior?
we have number of libraries internally using and build through angular ngc command for umd support (similar to angular package build commands). we are not able to update to Angular 5.1.0 with above bundle process does not emit decorators anymore.
Environment
Angular version: 5.1.0
Typescript: 2.5.x
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 25 (11 by maintainers)
Commits related to this issue
- test(compiler): reproduction for issue #20864 — committed to alxhub/angular by alxhub 7 years ago
@kemsky @mlc-mlapis i was able to get the umd bundle working properly with above changes to tsconfig.
This is fixed by tsickle@0.25.6
@kemsky ru using
annotateForClosureCompiler": true
option inangularCompilerOptions
? i just disabled this option and its emitting the decorators now. (also added"annotationsAs": "decorators"
option)i haven’t tested the full integration yet, will update here after testing its
while debugging this issue, i am seeing that having both
@Component
and@EntryComponent
decorators doesn’t emit the EntryComponent decorator while compiling. if i remove 1 other gets compiled. looks like new compiler doesn’t compile multiple decorators