build: update to rules nodejs 1.0.1 (#34589)
This brings in a few minor fixes including a better way to patch require for bootstrap scripts. PR Close #34589
This commit is contained in:
@ -6,13 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
if (process.env['TEST_SRCDIR']) {
|
||||
// bootstrap the bazel require resolve patch since this
|
||||
// script is a bootstrap script loaded with --node_options=--require=...
|
||||
const path = require('path');
|
||||
require(path.posix.join(
|
||||
process.env['TEST_SRCDIR'], process.env['TEST_WORKSPACE'],
|
||||
(process.env['TEST_BINARY'] as string).replace(/\.(sh|bat)$/, '_loader.js'), ));
|
||||
// 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();
|
||||
}
|
||||
|
||||
import 'zone.js/lib/node/rollup-main';
|
||||
|
Reference in New Issue
Block a user