Skip to content

Commit 7cd8b30

Browse files
authored
fix(cli): .vuepress/config.ts does not respect custom command (close: #3113) (#3114)
1 parent f6430ac commit 7cd8b30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vuepress/lib/handleUnknownCommand.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = async function (cli, options) {
5454

5555
async function inferUserDocsDirectory (cwd) {
5656
const paths = await globby([
57-
'**/.vuepress/config.js',
57+
'**/.vuepress/config.(js|ts)',
5858
'!**/node_modules/**'
5959
], {
6060
cwd,
@@ -64,7 +64,7 @@ async function inferUserDocsDirectory (cwd) {
6464
if (siteConfigPath) {
6565
return path.resolve(
6666
cwd,
67-
siteConfigPath.replace('.vuepress/config.js', '')
67+
siteConfigPath.replace(/\.vuepress\/config.(js|ts)/, '')
6868
)
6969
}
7070
return null

0 commit comments

Comments
 (0)