We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 245a69a commit 58d9939Copy full SHA for 58d9939
lib/broccoli/docs-compiler/navigation-index-generator.js
@@ -52,12 +52,20 @@ module.exports = class NavigationIndexGenerator {
52
return resolvedType || 'modules';
53
}
54
55
- _resolvedTypeForModule(module) {
56
- let [ , type ] = module.file.split('/');
+_resolvedTypeForModule(module) {
+ let path = module.file.split('/');
57
58
- return RESOLVED_TYPES.includes(type) && type;
+ // By default we assume that the type is at index 1
59
+ let type = path[1];
60
+
61
+ // If the module is a scoped package, then the type will be at index 2
62
+ if (path[0].charAt(0) === '@') {
63
+ type = path[2];
64
65
66
+ return RESOLVED_TYPES.includes(type) && type;
67
+}
68
69
_isResolvedType(module) {
70
return this._resolvedTypeForModule(module);
71
0 commit comments