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