Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit af8b635

Browse files
committed
fix: normalize the app module paths in order to avoid incorrect comparison on Windows
1 parent 11714e6 commit af8b635

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: transformers/ns-replace-lazy-loader.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// https://github.com/angular/angular-cli/blob/d202480a1707be6575b2c8cf0383cfe6db44413c/packages/schematics/angular/utility/ng-ast-utils.ts
44
// https://github.com/NativeScript/nativescript-schematics/blob/438b9e3ef613389980bfa9d071e28ca1f32ab04f/src/ast-utils.ts
55

6-
import { dirname, basename, extname, join } from "path";
6+
import { dirname, basename, extname, join, normalize } from "path";
77
import * as ts from "typescript";
88
import {
99
StandardTransform,
@@ -24,7 +24,7 @@ export function nsReplaceLazyLoader(getNgCompiler: () => AngularCompilerPlugin):
2424
let ops: TransformOperation[] = [];
2525
const entryModule = getResolvedEntryModule(getNgCompiler());
2626
const sourceFilePath = join(dirname(sourceFile.fileName), basename(sourceFile.fileName, extname(sourceFile.fileName)));
27-
if (!entryModule || sourceFilePath !== entryModule.path) {
27+
if (!entryModule || normalize(sourceFilePath) !== normalize(entryModule.path)) {
2828
return ops;
2929
}
3030

0 commit comments

Comments
 (0)