refactor(bundles): make rxjs an external dependency in umd bundle

Closes #5886
Closes #5893
This commit is contained in:
Jeff Cross 2015-12-14 17:33:40 -08:00 committed by Igor Minar
parent 321ed7d099
commit e950dd6a2a
1 changed files with 29 additions and 1 deletions

View File

@ -1143,7 +1143,35 @@ gulp.task('!bundles.js.umd', ['build.js.dev'], function() {
resolve: resolveOptions(devOrProd), resolve: resolveOptions(devOrProd),
module: {preLoaders: [{test: /\.js$/, loader: 'source-map-loader'}]}, module: {preLoaders: [{test: /\.js$/, loader: 'source-map-loader'}]},
devtool: devOrProd === 'dev' ? 'inline-source-map' : undefined, devtool: devOrProd === 'dev' ? 'inline-source-map' : undefined,
output: outputOptions(outFileName, devOrProd) output: outputOptions(outFileName, devOrProd),
externals: {
'rxjs/Observable': 'umd Rx',
'rxjs/Subject': 'umd Rx',
'rxjs/subject/ReplaySubject': {
commonjs: 'rxjs/subject/ReplaySubject',
commonjs2: 'rxjs/subject/ReplaySubject',
amd: 'rxjs/subject/ReplaySubject',
root: ['Rx']
},
'rxjs/operator/take': {
commonjs: 'rxjs/operator/take',
commonjs2: 'rxjs/operator/take',
amd: 'rxjs/operator/take',
root: ['Rx', 'Observable', 'prototype']
},
'rxjs/observable/fromPromise': {
commonjs: 'rxjs/observable/fromPromise',
commonjs2: 'rxjs/observable/fromPromise',
amd: 'rxjs/observable/fromPromise',
root: ['Rx', 'Observable']
},
'rxjs/operator/toPromise': {
commonjs: 'rxjs/operator/toPromise',
commonjs2: 'rxjs/operator/toPromise',
amd: 'rxjs/operator/toPromise',
root: ['Rx', 'Observable', 'prototype']
}
}
}; };
} }