From e01a6ba027ceef694b7bb4557e6a62b62ba209ca Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 5 Feb 2020 19:36:05 +0100 Subject: [PATCH] fix: angular example ts_scripts path in Windows In Windows `_/ts_scripts.js` will be expanded to `C:/Program Files/Git/ts_scripts.js`. ``` [ 'C:\\users\\alag\\_bazel_alag\\rj2iva3m\\external\\build_bazel_rules_nodejs\\internal\\node\\_node_bin\\node', 'C:\\users\\alag\\_bazel_alag\\rj2iva3m\\execroot\\examples_angular\\node_modules\\html-insert-assets\\src\\main.js', '--html=src/example/index.html', '--out=bazel-out/x64_windows-fastbuild/bin/src/index.html', '--roots=.', 'bazel-out/x64_windows-fastbuild/bin/src', '--assets', 'bazel-out/x64_windows-fastbuild/bin/src/styles.css', 'external/npm/node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css', 'external/npm/node_modules/zone.js/dist/zone.min.js', './_C:/Program Files/Git/ts_scripts.js' ] ``` This seems like some character escaping issue but in general escaping is hell and this is a more straightforward fix. Partially addresses: #1604 --- examples/angular/src/BUILD.bazel | 2 +- examples/angular_view_engine/src/BUILD.bazel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/angular/src/BUILD.bazel b/examples/angular/src/BUILD.bazel index c7c13c7730..036f3d7f4d 100644 --- a/examples/angular/src/BUILD.bazel +++ b/examples/angular/src/BUILD.bazel @@ -88,7 +88,7 @@ html_insert_assets( "--assets", ] + ["$(execpath %s)" % s for s in _ASSETS] + [ # This file doesn't exist during the build, but will be served by ts_devserver - "_/ts_scripts.js", + "./_/ts_scripts.js", ], data = ["//src:example/index.html"] + _ASSETS, ) diff --git a/examples/angular_view_engine/src/BUILD.bazel b/examples/angular_view_engine/src/BUILD.bazel index a84951fa5a..853fac517b 100644 --- a/examples/angular_view_engine/src/BUILD.bazel +++ b/examples/angular_view_engine/src/BUILD.bazel @@ -94,7 +94,7 @@ html_insert_assets( "--assets", ] + ["$(execpath %s)" % s for s in _ASSETS] + [ # This file doesn't exist during the build, but will be served by ts_devserver - "_/ts_scripts.js", + "./_/ts_scripts.js", ], data = ["//src:example/index.html"] + _ASSETS, )