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 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
http | ||
language-service | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
BUILD.bazel | ||
README.md | ||
empty.ts | ||
goog.d.ts | ||
license-banner.txt | ||
system.d.ts | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
License: MIT