-
Notifications
You must be signed in to change notification settings - Fork 12k
Enable ts-helpers by default in generated projects #3325
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
Comments
I'm pretty sure that dependency is a leftover that was never removed. |
although TS 2.1 has better support for external helpers some steps are still needed: tsconfig.ts (aot too) --> add flag importHelpers:true Typescript will insert the import statements itself this will give an important improvement in dist code size |
Yes. However, this is blocked until the CLI supports 2.1. |
I think the TS 2.1 approach is the more adequate one for this problem, yeah. |
When is angular-cli going to support TypeScript 2.1 ? |
Superseded by #6277 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
All projects generated by
angular-cli
have a dependency onts-helpers
, butts-helpers
is not imported into the projects (or test harness) and the compiler outputs helpers in every file that needs them (which is every file that uses decorators orextends
). Usingts-helpers
in generated projects by default will have the benefit of reducing build sizes for the average user.Generated projects should have the following modifications:
import 'ts-helpers';
at the top ofsrc/main.ts
andsrc/test.ts
afterimport './polyfills.ts';
"noEmitHelpers": true
to thecompilerOptions
object insrc/tsconfig.json
Versions.
angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64
Repro steps.
ng new test-project
grep
forimport 'ts-helpers';
and find 0 instancessrc/tsconfig.js
and find no"noEmitHelpers": true
The text was updated successfully, but these errors were encountered: