Skip to content

Commit 1558501

Browse files
authored
fixed parsing components in the same file as modules
1 parent f3068c0 commit 1558501

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/component.helper.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@ const handleComponent = (route, routesFileContent, relativePath = null) => {
164164
lazy: false,
165165
type: 'component'
166166
}];
167+
} else if (routesFileContent.includes('@Component')) {
168+
return [{
169+
path: route.path,
170+
loadComponent: relativePath,
171+
componentName: route.component,
172+
parent: route.parent,
173+
lazy: false,
174+
type: 'component'
175+
}];
167176
} else {
168177
console.error(`Could not find path for component: ${route.component}`, route);
169178
return [null];

0 commit comments

Comments
 (0)