We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 698e599 commit 6a18c91Copy full SHA for 6a18c91
packages/@vuepress/cli/src/utils/resolveAppConfig.ts
@@ -1,6 +1,6 @@
1
import type { AppConfig } from '@vuepress/core'
2
import { ensureEndingSlash, ensureLeadingSlash } from '@vuepress/shared'
3
-import { chalk, logger, path } from '@vuepress/utils'
+import { chalk, isChildPath, logger } from '@vuepress/utils'
4
5
/**
6
* Resolve app config according to:
@@ -49,10 +49,7 @@ export const resolveAppConfig = ({
49
)
50
}
51
52
- if (
53
- appConfig.dest &&
54
- path.normalize(appConfig.source).includes(path.normalize(appConfig.dest))
55
- ) {
+ if (appConfig.dest && isChildPath(appConfig.source, appConfig.dest)) {
56
logger.warn(
57
`${chalk.magenta('dest')} directory would be emptied during build,` +
58
` so we fallback it to the default directory for the safety of your source files`
0 commit comments