Closed
Description
Bug Report or Feature Request (mark with an x
)
- [x] feature request
Versions.
@angular/cli: 1.0.3
node: 6.9.5
os: darwin x64
@angular/animations: 4.2.0-beta.1
@angular/common: 4.2.0-beta.1
@angular/compiler: 4.2.0-beta.1
@angular/core: 4.2.0-beta.1
@angular/forms: 4.2.0-beta.1
@angular/http: 4.2.0-beta.1
@angular/material: 2.0.0-beta.4
@angular/platform-browser: 4.2.0-beta.1
@angular/platform-browser-dynamic: 4.2.0-beta.1
@angular/platform-server: 4.2.0-beta.1
@angular/router: 4.2.0-beta.1
@angular/service-worker: 1.0.0-beta.13
@angular/cli: 1.0.3
@angular/compiler-cli: 4.2.0-beta.1
Desired functionality.
reflect-metadata is a sizible chunk of code that slows down the critical path in production mode. It's only needed in the JIT (dev) mode (however we want to drop the need for in from core as well).
Currently there is no way to include the polyfill only for dev bundles. I tried using environment.ts
but that gets loaded too late after the reflect api is already used by the app code.
It would be great to have a way to either strip the polyfill or have an alternative entry path for production polyfills.