fix(glob): add expandDirectories: false for better fast-glob compatibility

pull/4132/head
Cristopher 1 year ago
parent 2294bf61d3
commit 11d92c3e2c
No known key found for this signature in database
GPG Key ID: E31DBC7E9AEE527C

@ -118,6 +118,7 @@ export function createContentLoader<T = ContentData[]>(
files = ( files = (
await glob(pattern, { await glob(pattern, {
ignore: ['**/node_modules/**', '**/dist/**'], ignore: ['**/node_modules/**', '**/dist/**'],
expandDirectories: false,
...globOptions ...globOptions
}) })
).sort() ).sort()

@ -32,7 +32,8 @@ export async function resolvePages(
'**/node_modules/**', '**/node_modules/**',
'**/dist/**', '**/dist/**',
...(userConfig.srcExclude || []) ...(userConfig.srcExclude || [])
] ],
expandDirectories: false
}) })
).sort() ).sort()

@ -101,7 +101,8 @@ export const staticDataPlugin: Plugin = {
if (typeof watch === 'string') watch = [watch] if (typeof watch === 'string') watch = [watch]
watchedFiles = ( watchedFiles = (
await glob(watch, { await glob(watch, {
ignore: ['**/node_modules/**', '**/dist/**'] ignore: ['**/node_modules/**', '**/dist/**'],
expandDirectories: false
}) })
).sort() ).sort()
} }

Loading…
Cancel
Save