58436fd81a
This change is kind of similar to #27466, but instead of ensuring that these shims can be generated, we also need to make sure that developers are able to also use the factory shims like with `ngc`. This issue is now surfacing because we have various old examples which are now also built with `ngtsc` (due to the bazel migration). On case insensitive platforms (e.g. windows) these examples cannot be built because ngtsc fails the app imports a generated shim file (such as the factory shim files). This is because the `GeneratedShimsHostWrapper` TypeScript host uses the `getCanonicalFileName` method in order to check whether a given file/module exists in the generator file maps. e.g. ``` // Generator Map: 'C:/users/paul/_bazel_paul/lm3s4mgv/execroot/angular/packages/core/index.ngfactory.ts' => 'C:/users/paul/_bazel_paul/lm3s4mgv/execroot/angular/packages/core/index.ts', // Path passed into `fileExists` C:/users/paul/_bazel_paul/lm3s4mgv/execroot/angular/packages/core/index.ngfactory.ts // After getCanonicalFileName (notice the **lower-case drive name**) c:/users/paul/_bazel_paul/lm3s4mgv/execroot/angular/packages/core/index.ngfactory.ts ``` As seen above, the generator map does not use the canonical file names, as well as TypeScript internally does not pass around canonical file names. We can fix this by removing the manual call to `getCanonicalFileName` and just following TypeScript internal-semantics. PR Close #28831 |
||
---|---|---|
.buildkite | ||
.circleci | ||
.github | ||
.vscode | ||
aio | ||
docs | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.nvmrc | ||
BUILD.bazel | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE | ||
browser-providers.conf.js | ||
browser_repositories.bzl | ||
gulpfile.js | ||
index.bzl | ||
karma-js.conf.js | ||
package.json | ||
protractor-perf.conf.js | ||
renovate.json | ||
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.