fix(build): resolve patter relative to srcDir instead of root in createContentLoader (#3638)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
pull/3651/head
Timothy Lau 4 months ago committed by GitHub
parent 2b40266dac
commit 59183e9cef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -75,7 +75,7 @@ export interface ContentData {
*/
export function createContentLoader<T = ContentData[]>(
/**
* files to glob / watch - relative to <project root>
* files to glob / watch - relative to srcDir
*/
pattern: string | string[],
{
@ -98,7 +98,7 @@ export function createContentLoader<T = ContentData[]>(
}
if (typeof pattern === 'string') pattern = [pattern]
pattern = pattern.map((p) => normalizePath(path.join(config.root, p)))
pattern = pattern.map((p) => normalizePath(path.join(config.srcDir, p)))
let md: MarkdownRenderer

Loading…
Cancel
Save