|
1 | 1 | # Re-export of Bazel rules with repository-wide defaults |
2 | 2 |
|
3 | 3 | load("@rules_pkg//:pkg.bzl", "pkg_tar") |
4 | | -load("@build_bazel_rules_nodejs//:index.bzl", _pkg_npm = "pkg_npm") |
5 | 4 | load("@rules_sass//src:index.bzl", _sass_binary = "sass_binary", _sass_library = "sass_library") |
6 | 5 | load("@npm//@angular/bazel:index.bzl", _ng_package = "ng_package") |
7 | 6 | load("//:packages.bzl", "NO_STAMP_NPM_PACKAGE_SUBSTITUTIONS", "NPM_PACKAGE_SUBSTITUTIONS") |
@@ -101,23 +100,3 @@ def ng_package( |
101 | 100 | interop_deps = [d.replace("_legacy", "") for d in deps] + package_deps, |
102 | 101 | package_name = package_name, |
103 | 102 | ) |
104 | | - |
105 | | -def pkg_npm(name, visibility = None, **kwargs): |
106 | | - _pkg_npm( |
107 | | - name = name, |
108 | | - # We never set a `package_name` for NPM packages, neither do we enable validation. |
109 | | - # This is necessary because the source targets of the NPM packages all have |
110 | | - # package names set and setting a similar `package_name` on the NPM package would |
111 | | - # result in duplicate linker mappings that will conflict. e.g. consider the following |
112 | | - # scenario: We have a `ts_library` for `@angular/cdk`. We will configure a package |
113 | | - # name for the target so that it can be resolved in NodeJS executions from `node_modules`. |
114 | | - # If we'd also set a `package_name` for the associated `pkg_npm` target, there would be |
115 | | - # two mappings for `@angular/cdk` and the linker will complain. For a better development |
116 | | - # experience, we want the mapping to resolve to the direct outputs of the `ts_library` |
117 | | - # instead of requiring tests and other targets to assemble the NPM package first. |
118 | | - package_name = None, |
119 | | - validate = False, |
120 | | - substitutions = npmPackageSubstitutions, |
121 | | - visibility = visibility, |
122 | | - **kwargs |
123 | | - ) |
0 commit comments