Skip to content

Commit

Permalink
fix(http): flatten metadata for @angular/http/testing
Browse files Browse the repository at this point in the history
@angular/http/testing used to publish a metadata structure which paralleled
the .d.ts structure. This causes ngc to write incorrect imports for this
bundle when compiling providers using MockBackend and other http testing
classes.

This change restructures the @angular/http/testing build a bit, modeling it
after @angular/platform-browser-animations, and produces a FESM structure
that has flat metadata.

Fixes angular#15521.
  • Loading branch information
alxhub committed May 3, 2017
1 parent 9684d78 commit 520bc31
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
14 changes: 14 additions & 0 deletions packages/http/testing/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

/**
* @module
* @description
* Entry point for all public APIs of the http testing package.
*/
export * from './src/testing';
7 changes: 5 additions & 2 deletions packages/http/testing/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
}
},
"files": [
"index.ts"
"public_api.ts"
],
"angularCompilerOptions": {
"strictMetadataEmit": true
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"flatModuleOutFile": "index.js",
"flatModuleId": "@angular/http/testing"
}
}

0 comments on commit 520bc31

Please sign in to comment.