-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@angular/cli): add typing for module.id for SystemJS usage
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/@angular/cli/blueprints/ng/files/__path__/typings.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* SystemJS module definition */ | ||
This comment has been minimized.
Sorry, something went wrong. |
||
declare var module: { | ||
id: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')); | ||
} |
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 namemodule
, as specified by CommonJS.Do you want a PR, to fix this?