Permalink
Browse files

Use TSC to ship app as one bundle

... saving many round trips and much time, during development of a large application
  • Loading branch information...
1 parent 98cb419 commit 3cf3041dd80ee8701a3cffb0cbe6264784017a2b @kylecordes committed May 29, 2016
Showing with 4 additions and 5 deletions.
  1. +2 −1 index.html
  2. +0 −3 systemjs.config.js
  3. +2 −1 tsconfig.json
View
@@ -13,8 +13,9 @@
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="systemjs.config.js"></script>
+ <script src="appbundle.js"></script>
<script>
- System.import('app').catch(function(err){ console.error(err); });
+ System.import('main').catch(function(err){ console.error(err); });
</script>
</head>
View
@@ -6,16 +6,13 @@
// map tells the System loader where to look for things
var map = {
- 'app': 'app', // 'dist',
-
'@angular': 'node_modules/@angular',
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
'rxjs': 'node_modules/rxjs'
};
// packages tells the System loader how to load when no filename and/or no extension
var packages = {
- 'app': { main: 'main.js', defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' },
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
};
View
@@ -1,7 +1,8 @@
{
"compilerOptions": {
"target": "es5",
- "module": "commonjs",
+ "module": "system",
+ "outFile": "appbundle.js",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,

0 comments on commit 3cf3041

Please sign in to comment.