8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06976f4 commit 7d7ef21Copy full SHA for 7d7ef21
packages/angular-cli/models/find-lazy-modules.ts
@@ -55,7 +55,12 @@ export function findLazyModules(projectRoot: any): {[key: string]: string} {
55
glob.sync(path.join(projectRoot, '/**/*.ts'))
56
.forEach(tsPath => {
57
findLoadChildren(tsPath).forEach(moduleName => {
58
- const fileName = path.resolve(projectRoot, moduleName) + '.ts';
+ let fileName = path.resolve(projectRoot, moduleName) + '.ts';
59
+ // If path is a relative path
60
+ if (moduleName.startsWith('.')) {
61
+ const tsPathInfo = path.parse(tsPath);
62
+ fileName = path.resolve(tsPathInfo.dir, moduleName) + '.ts';
63
+ }
64
if (fs.existsSync(fileName)) {
65
// Put the moduleName as relative to the main.ts.
66
result[moduleName] = fileName;
0 commit comments