Previously, the compiler assumed that all TS files logically within a project existed under one or more "root directories". If the TS compiler option `rootDir` or `rootDirs` was set, they would dictate the root directories in use, otherwise the current directory was used. Unfortunately this assumption was unfounded - it's common for projects without explicit `rootDirs` to import from files outside the current working directory. In such cases the `LogicalProjectStrategy` would attempt to generate imports into those files, and fail. This would lead to no `ReferenceEmitStrategy` being able to generate an import, and end in a compiler assertion failure. This commit introduces a new strategy to use when there are no `rootDirs` explicitly present, the `RelativePathStrategy`. It uses simpler, filesystem- relative paths to generate imports, even to files above the current working directory. Fixes #33659 Fixes #33562 PR Close #33828
…
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.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%