Skip to content

Commit fedcef4

Browse files
committed
build: exclude devDependencies from distributed packages
This update removes `devDependencies` from the shipped packages. It addresses an issue where yarn attempts to resolve patches during installation in the Angular repository, resulting in the following error:
1 parent a5da51e commit fedcef4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

package.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ stampSubstitutions = {
77
noStampSubstitutions = dict(stampSubstitutions, **{})
88

99
basePackageSubstitutions = {
10+
# Remove devDependencies for shipped built packages.
11+
# For some odd reason, yarn is tring to resolve the patches when this is installed in angular/angular
12+
# Couldn't find any versions for "@angular/bazel" that matches "patch:@angular/bazel@npm:14.1.0-next.2#.yarn/patches/@angular-bazel-npm.patch"
13+
# ? Please choose a version of "@angular/bazel" from this list: (Use arrow keys)
14+
"\"devDependencies\":[\\w\\W\\s]+?\\s+},\\s+": "",
1015
"(#|//)\\s+BEGIN-DEV-ONLY[\\w\\W]+?(#|//)\\s+END-DEV-ONLY": "",
1116
" \"prepare\": \"husky install\",\n": "",
1217
"@dev-infra//bazel/": "@npm//@angular/build-tooling/bazel/",

0 commit comments

Comments
 (0)