We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63500f3 commit 0a34742Copy full SHA for 0a34742
src/utils/source.ts
@@ -1,5 +1,5 @@
1
import { readFile } from 'node:fs/promises'
2
-import { join } from 'pathe'
+import { join, normalize } from 'pathe'
3
import { withLeadingSlash, withoutTrailingSlash } from 'ufo'
4
import { glob } from 'tinyglobby'
5
import type { CollectionSource, ResolvedCollectionSource } from '../types/collection'
@@ -25,7 +25,7 @@ export function defineLocalSource(source: CollectionSource | ResolvedCollectionS
25
prefix: withoutTrailingSlash(withLeadingSlash(fixed)),
26
prepare: async ({ rootDir }) => {
27
resolvedSource.cwd = source.cwd
28
- ? String(source.cwd).replace(/^~~\//, rootDir)
+ ? String(normalize(source.cwd)).replace(/^~~\//, rootDir)
29
: join(rootDir, 'content')
30
},
31
getKeys: async () => {
0 commit comments