Revert "build: update to rules nodejs 1.0.1 (#34589)" (#34730)

This reverts commit 8042433cb0.

PR Close #34730
This commit is contained in:
atscott
2020-01-10 13:39:57 -08:00
parent 0bdaac7b77
commit cdf1b5f985
16 changed files with 116 additions and 95 deletions

View File

@ -6,10 +6,13 @@
* 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();
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'), ));
}
import 'zone.js/lib/node/rollup-main';