fix(vant-cli): fix the bug of getting MD file in windows (#5626)

This commit is contained in:
yinhui1129754
2020-02-05 15:32:15 +08:00
committed by GitHub
parent 1039db5496
commit d6d5581eef

View File

@@ -65,7 +65,7 @@ function resolveDocuments(components: string[]): DocumentItem[] {
});
}
const staticDocs = glob.sync(join(DOCS_DIR, '**/*.md')).map(path => {
const staticDocs = glob.sync(normalizePath(join(DOCS_DIR, '**/*.md'))).map(path => {
const pairs = parse(path).name.split('.');
return {
name: formatName(pairs[0], pairs[1] || defaultLang),