angular-docs-cn/packages/bazel/src
Paul Gschwendtner d5293d2aa3 fix(bazel): ng_package rule should update "package.json" of ts_library targets (#36944)
In the past we added support for `ts_library` to `ng_package`. For those
targets we never can determine the "index" file. Unlike `ng_module`,
there is no provider data for flat module bundles, so the `ng_package`
rule assumes that the index file is simply called `index`.

This works as expected, but we also added logic in the past that doesn't
allow `ng_package` to add format properties (e.g. `main`, `module`) to a
`package.json` if a package json is handwritten for such a `ts_library` target.

This has been done that way because we assumed that such `package.json` files
might want to set format properties explicitly to different paths due to a
faulty "index" guess.

We want to change this behavior as most of the time a `package.json`
file already exists with just the module name. In those cases, the
packager should still set the format properties. We should only warn
and skip automatic insertion of the format properties if such a
`package.json` explicitly sets format properties.

PR Close #36944
2020-05-06 13:54:26 -07:00
..
api-extractor build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
builders build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
ng_package fix(bazel): ng_package rule should update "package.json" of ts_library targets (#36944) 2020-05-06 13:54:26 -07:00
ngc-wrapped build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
schematics build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
BUILD.bazel build: update to rules nodejs 1.0.1 (#34736) 2020-01-15 14:58:07 -05:00
esm5.bzl build(bazel): remove hacky fake @angular/bazel npm package under tools/npm/@angular_bazel (#36009) 2020-03-11 14:43:13 -04:00
external.bzl build: update to nodejs rules 0.38.3 (#33073) 2019-10-14 20:25:57 +00:00
modify_tsconfig.js build: update to rules_nodejs 0.38 (#32889) 2019-10-08 09:27:11 -07:00
ng_module.bzl fix(bazel): do not use manifest paths for generated imports within compilation unit (#35841) 2020-03-06 17:31:10 -05:00