build(bazel): do not build rxjs from source under Bazel (#28869)
PR Close #28869
This commit is contained in:
@ -165,6 +165,7 @@ def ts_web_test_suite(bootstrap = [], deps = [], **kwargs):
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"]
|
||||
local_deps = [
|
||||
"@ngdeps//node_modules/tslib:tslib.js",
|
||||
"//tools/rxjs:rxjs_umd_modules",
|
||||
"//tools/testing:browser",
|
||||
] + deps
|
||||
|
||||
|
9
tools/rxjs/BUILD.bazel
Normal file
9
tools/rxjs/BUILD.bazel
Normal file
@ -0,0 +1,9 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
filegroup(
|
||||
name = "rxjs_umd_modules",
|
||||
srcs = [
|
||||
":rxjs_shims.js",
|
||||
"@ngdeps//node_modules/rxjs:bundles/rxjs.umd.js",
|
||||
],
|
||||
)
|
35
tools/rxjs/rxjs_shims.js
Normal file
35
tools/rxjs/rxjs_shims.js
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// rxjs/operators
|
||||
(function(factory) {
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('rxjs/operators', ['exports', 'rxjs'], factory);
|
||||
}
|
||||
})(function(exports, rxjs) {
|
||||
'use strict';
|
||||
Object.keys(rxjs.operators).forEach(function(key) { exports[key] = rxjs.operators[key]; });
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
});
|
||||
|
||||
// rxjs/testing
|
||||
(function(factory) {
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('rxjs/testing', ['exports', 'rxjs'], factory);
|
||||
}
|
||||
})(function(exports, rxjs) {
|
||||
'use strict';
|
||||
Object.keys(rxjs.testing).forEach(function(key) { exports[key] = rxjs.testing[key]; });
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
});
|
Reference in New Issue
Block a user