Skip to content

Enable ts-helpers by default in generated projects #3325

@bryanforbes

Description

@bryanforbes

All projects generated by angular-cli have a dependency on ts-helpers, but ts-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 or extends). Using ts-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:

  1. Add import 'ts-helpers'; at the top of src/main.ts and src/test.ts after import './polyfills.ts';
  2. Add "noEmitHelpers": true to the compilerOptions object in src/tsconfig.json

Versions.

angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64

Repro steps.

  1. ng new test-project
  2. grep for import 'ts-helpers'; and find 0 instances
  3. Inspect src/tsconfig.js and find no "noEmitHelpers": true

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions