Skip to content

Commit 49e0ee4

Browse files
jaylinskiyyx990803
authored andcommitted
Allow index.md files as index pages (#23)
Until now, only `README.md` files got treated as a directory index. This commit also allows `index.md` to be used as index files.
1 parent 9cb481a commit 49e0ee4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/prepare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ async function genComponentRegistrationFile ({ sourceDir }) {
189189
return `import Vue from 'vue'\n` + components.map(genImport).join('\n')
190190
}
191191

192-
const indexRE = /\breadme\.md$/i
192+
const indexRE = /\b(index|readme)\.md$/i
193193
const extRE = /\.(vue|md)$/
194194

195195
function fileToPath (file) {

0 commit comments

Comments
 (0)