parent
f9211fde33
commit
0047919e2d
|
@ -18,7 +18,7 @@
|
|||
var packages = {
|
||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' },
|
||||
'angular2-in-memory-web-api': { defaultExtension: 'js' },
|
||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
||||
};
|
||||
|
||||
var ngPackageNames = [
|
||||
|
@ -33,10 +33,21 @@
|
|||
'upgrade',
|
||||
];
|
||||
|
||||
// Add package entries for angular packages
|
||||
ngPackageNames.forEach(function(pkgName) {
|
||||
// Individual files (~300 requests):
|
||||
function packIndex(pkgName) {
|
||||
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
||||
}
|
||||
|
||||
// Bundled (~40 requests):
|
||||
function packUmd(pkgName) {
|
||||
packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' };
|
||||
});
|
||||
};
|
||||
|
||||
// Most environments should use UMD; some (Karma) need the individual index files
|
||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
||||
|
||||
// Add package entries for angular packages
|
||||
ngPackageNames.forEach(setPackageConfig);
|
||||
|
||||
var config = {
|
||||
map: map,
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' };
|
||||
};
|
||||
|
||||
// Most environments should use UMD; some (Karma) need the individual index files
|
||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
||||
|
||||
// Add package entries for angular packages
|
||||
|
|
Loading…
Reference in New Issue