File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,20 @@ export function load (app) {
49
49
}
50
50
51
51
if ( isMonorepoParent ) {
52
+ let project = urlMapping . model . name
53
+
54
+ if ( project === 'index' && urlMapping . model . parent != null ) {
55
+ project = urlMapping . model . parent ?. name
56
+ }
57
+
58
+ if ( projects [ project ] == null ) {
59
+ throw new Error ( `Could not derive project name from url mapping model "${ urlMapping . model . name } " with parent "${ urlMapping . model . parent ?. name } "` )
60
+ }
61
+
52
62
return {
53
63
comment : urlMapping . model . comment ,
54
- manifestPath : path . join ( projects [ urlMapping . model . name ] . dir , 'package.json' ) ,
55
- readmePath : path . join ( projects [ urlMapping . model . name ] . dir , 'README.md' )
64
+ manifestPath : path . join ( projects [ project ] . dir , 'package.json' ) ,
65
+ readmePath : path . join ( projects [ project ] . dir , 'README.md' )
56
66
}
57
67
}
58
68
You can’t perform that action at this time.
0 commit comments