fix: use exact path & handle non-index pages

This commit is contained in:
endiliey 2018-08-08 14:45:54 +08:00
parent 0fcad83410
commit d9def2865a
2 changed files with 4 additions and 2 deletions

View file

@ -7,6 +7,7 @@ async function genRoutesConfig({docsData, docsDir, pagesData}) {
return `
{
path: ${JSON.stringify(docsPath)},
exact: true,
component: () => <Docs><${componentName} /></Docs>
}`;
}
@ -22,6 +23,7 @@ async function genRoutesConfig({docsData, docsDir, pagesData}) {
return `
{
path: ${JSON.stringify(pagesPath)},
exact: true,
component: ${componentName}
}`;
}