995cd15a69
Previously we only searched for package paths below the set of `basePaths` that were computed from the `basePath` provided to ngcc and the set of `pathMappings`. In some scenarios, such as hoisted packages, the entry-point is not within any of the `basePaths` identified above. For example: ``` project packages app node_modules app-lib (depends on lib1) node_modules lib1 (depends on lib2) node_modules lib2 (depends on lib3/entry-point) lib3 entry-point ``` When CLI is compiling `app-lib` ngcc will be given `project/packages/app/node_modules` as the `basePath. If ngcc is asked to target `lib2`, the `targetPath` will be `project/node_modules/lib1/node_modules/lib2`. Since `lib2` depends upon `lib3/entry-point`, ngcc will need to compute the package path for `project/node_modules/lib3/entry-point`. Since `project/node_modules/lib3/entry-point` is not contained in the `basePath` `project/packages/app/node_modules`, ngcc failed to compute the `packagePath` correctly, instead assuming that it was the same as the entry-point path. Now we also consider the nearest `node_modules` folder to the entry-point path as an additional `basePath`. If one is found then we use the first directory directly below that `node_modules` directory as the package path. In the case of our example this extra `basePath` would be `project/node_modules` which allows us to compute the `packagePath` of `project/node_modules/lib3`. Fixes #35747 PR Close #36249 |
||
---|---|---|
.circleci | ||
.devcontainer | ||
.github | ||
.vscode | ||
.yarn | ||
aio | ||
dev-infra | ||
docs | ||
goldens | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.bazelversion | ||
.clang-format | ||
.dev-infra.json | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.nvmrc | ||
.pullapprove.yml | ||
.yarnrc | ||
BUILD.bazel | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE | ||
browser-providers.conf.js | ||
gulpfile.js | ||
karma-js.conf.js | ||
package.json | ||
protractor-perf.conf.js | ||
shims_for_IE.js | ||
test-events.js | ||
test-main.js | ||
tslint.json | ||
yarn.lock | ||
yarn.lock.readme.md |
README.md
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.