Skip to content

Commit

Permalink
fix(@angular/cli): add typing for module.id for SystemJS usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Brocco authored and hansl committed Mar 3, 2017
1 parent f3644a9 commit 21d776f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
@@ -0,0 +1,4 @@
/* SystemJS module definition */

This comment has been minimized.

Copy link
@JohannesHoppe

JohannesHoppe Mar 24, 2017

Contributor

Found this in the latest blueprints.
This comment is lying! ;-) Webpack, Require.js and friends support this, too.
module.id comes from the magic module with the name module, as specified by CommonJS.

Do you want a PR, to fix this?

declare var module: {
id: string;
};
11 changes: 11 additions & 0 deletions tests/e2e/tests/build/module-id.ts
@@ -0,0 +1,11 @@
import { ng } from '../../utils/process';
import { replaceInFile } from "../../utils/fs";


export default function() {
return Promise.resolve()
.then(() => replaceInFile('src/app/app.component.ts',
'@Component({',
'@Component({ moduleId: module.id,'))
.then(() => ng('build'));
}

0 comments on commit 21d776f

Please sign in to comment.