build: add a before-all-other bootstrap script that patches require (#34589)

This removes the churn in the existing bootstrap scripts.

PR Close #34589
This commit is contained in:
Greg Magolan
2020-01-08 01:14:27 -08:00
committed by atscott
parent 4754e495dc
commit c3e8439954
10 changed files with 34 additions and 43 deletions

View File

@ -6,12 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
// bootstrap the bazel require patch since this bootstrap script is loaded with
// `--node_options=--require=$(rlocation $(location script.js))`
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
}
// Must be loaded before zone loads, so that zone can detect WTF.
import './test_fake_polyfill';

View File

@ -13,12 +13,6 @@
* found in the LICENSE file at https://angular.io/license
*/
// bootstrap the bazel require patch since this bootstrap script is loaded with
// `--node_options=--require=$(rlocation $(location script.js))`
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
}
// Must be loaded before zone loads, so that zone can detect WTF.
import './node-env-setup';
import './test_fake_polyfill';

View File

@ -13,12 +13,6 @@
* found in the LICENSE file at https://angular.io/license
*/
// bootstrap the bazel require patch since this bootstrap script is loaded with
// `--node_options=--require=$(rlocation $(location script.js))`
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
}
// Must be loaded before zone loads, so that zone can detect WTF.
import './node-env-setup';
import './test_fake_polyfill';

View File

@ -6,12 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
// bootstrap the bazel require patch since this bootstrap script is loaded with
// `--node_options=--require=$(rlocation $(location script.js))`
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
}
process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] =
'disable';
import './node_error_entry_point';

View File

@ -6,11 +6,5 @@
* found in the LICENSE file at https://angular.io/license
*/
// bootstrap the bazel require patch since this bootstrap script is loaded with
// `--node_options=--require=$(rlocation $(location script.js))`
if (process.env['BAZEL_NODE_RUNFILES_HELPER']) {
require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string).patchRequire();
}
process.env['errorpolicy'] = (global as any)['__Zone_Error_BlacklistedStackFrames_policy'] = 'lazy';
import './node_error_entry_point';