Skip to content

Commit fefa16c

Browse files
meteorlxyulivz
authored andcommitted
fix: index file judgement bug (close: #306) (#308)
1 parent 7ed3620 commit fefa16c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/prepare.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ async function genComponentRegistrationFile ({ sourceDir }) {
236236
return `import Vue from 'vue'\n` + components.map(genImport).join('\n')
237237
}
238238

239-
const indexRE = /\b(index|readme)\.md$/i
239+
const indexRE = /(?<=(^|\/))(index|readme)\.md$/i
240240
const extRE = /\.(vue|md)$/
241241

242242
function fileToPath (file) {

0 commit comments

Comments
 (0)