diff --git a/lib/prepare.js b/lib/prepare.js index 2d0fc56db2..ce8371b9cd 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -236,7 +236,7 @@ async function genComponentRegistrationFile ({ sourceDir }) { return `import Vue from 'vue'\n` + components.map(genImport).join('\n') } -const indexRE = /\b(index|readme)\.md$/i +const indexRE = /(?<=(^|\/))(index|readme)\.md$/i const extRE = /\.(vue|md)$/ function fileToPath (file) {