Skip to content

Commit a9bb00c

Browse files
committed
build: minimize fakes in Windows for critters bundling
This commit addresses linker limitations on Windows, which are susceptible to race conditions when targets are built concurrently. Example CI run: https://github.com/angular/angular-cli/actions/runs/10602179601/job/29383657763?pr=28302
1 parent f2edaaf commit a9bb00c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

packages/angular/ssr/third_party/critters/BUILD.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ package(default_visibility = ["//visibility:public"])
66
esbuild(
77
name = "bundled_critters",
88
config = ":esbuild_config",
9-
entry_point = "@npm//:node_modules/critters/dist/critters.mjs",
9+
# We should be able to use "@npm//:node_modules/critters/dist/critters.mjs" as entry_point and avoid having to create a file.
10+
# But this causes a lot of flakes on Windows due to the linker.
11+
# [link_node_modules.js] An error has been reported: [Error: ENOENT: no such file or directory,
12+
# unlink 'C:\users\runneradmin\_bazel_runneradmin\whf6gbwo\execroot\angular_cli\node_modules']
13+
entry_point = ":index.mjs",
1014
metafile = True,
1115
splitting = True,
1216
deps = [
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export { default } from 'critters';

0 commit comments

Comments
 (0)