Skip to content

Commit

Permalink
fix(cli): .vuepress/config.ts does not respect custom command (close:
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Jan 6, 2023
1 parent f6430ac commit 7cd8b30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vuepress/lib/handleUnknownCommand.js
Expand Up @@ -54,7 +54,7 @@ module.exports = async function (cli, options) {

async function inferUserDocsDirectory (cwd) {
const paths = await globby([
'**/.vuepress/config.js',
'**/.vuepress/config.(js|ts)',
'!**/node_modules/**'
], {
cwd,
Expand All @@ -64,7 +64,7 @@ async function inferUserDocsDirectory (cwd) {
if (siteConfigPath) {
return path.resolve(
cwd,
siteConfigPath.replace('.vuepress/config.js', '')
siteConfigPath.replace(/\.vuepress\/config.(js|ts)/, '')
)
}
return null
Expand Down

0 comments on commit 7cd8b30

Please sign in to comment.