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 66 */
77( function ( global ) {
88 System . config ( {
9+ // #docregion paths
910 paths : {
1011 'npm:' : 'https://unpkg.com/' // path serves as alias
1112 } ,
13+ // #enddocregion paths
1214 // map tells the System loader where to look for things
1315 map : {
1416 app : 'app' , // location of transpiled app files
Original file line number Diff line number Diff line change 6666 (3) Add `systemjs.config.server.js` (shown in the code sample below) to your root folder.
6767 This alternative version configures _SystemJS_ to load _UMD_ versions of Angular
6868 (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`.
7083
7184 The following trivial router sample app shows these changes.
7285
You can’t perform that action at this time.
0 commit comments