-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@angular-devkit/build-angular): correctly generate ServiceWorker …
…config on Windows Since #20518, the generation of the ServiceWorker configuration has been broken on Windows. The reason is the use of `path.posix.*` methods on non-POSIX paths, resulting in broken paths. I.e. we ended up with something like the following: ```js path.posix.relative('C:\\foo', 'C:\\foo\\bar/baz'); // Expected result: `bar/baz` // Actual result: `../C:\\foo\\bar/baz` ``` This caused the config generator to fail to find any files and thus fail to populate the config with cacheable assets. This commit fixes this by using platform-specific `path.*` methods for path manipulation and manually normalizing the path separators before returning the results. Fixes #20894
- Loading branch information
Showing
2 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters