This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
_examples/production-deploy/ts Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
( function ( global ) {
8
8
System . config ( {
9
+ // #docregion paths
9
10
paths : {
10
11
'npm:' : 'https://unpkg.com/' // path serves as alias
11
12
} ,
13
+ // #enddocregion paths
12
14
// map tells the System loader where to look for things
13
15
map : {
14
16
app : 'app' , // location of transpiled app files
Original file line number Diff line number Diff line change 66
66
(3) Add `systemjs.config.server.js` (shown in the code sample below) to your root folder.
67
67
This alternative version configures _SystemJS_ to load _UMD_ versions of Angular
68
68
(and other third-party packages) from the web.
69
- Modify it as necessary to stay in sync with changes you make to `systemjs.config.js`.
69
+
70
+ Pay special attention to the `paths` key:
71
+
72
+ + makeExample('systemjs.config.server.js' , 'paths' , '' )( format ="." )
73
+
74
+ :marked
75
+ In your usual SystemJS config the `npm` path points at your local `node_modules/`,
76
+ but on the server config it points at https://unpkg.com/ - a site that hosts NPM packages.
77
+
78
+ This way you can load your node modules from the internet directly.
79
+ You can use any other provider you which, as long as it serves the needed files.
80
+
81
+ Modify `systemjs.config.server.js` as necessary to stay in sync with changes
82
+ you make to `systemjs.config.js`.
70
83
71
84
The following trivial router sample app shows these changes.
72
85
You can’t perform that action at this time.
0 commit comments