Skip to content

Commit

Permalink
fix(build): resolve patter relative to srcDir instead of root in crea…
Browse files Browse the repository at this point in the history
…teContentLoader (#3638)

Co-authored-by: Divyansh Singh <[email protected]>
  • Loading branch information
0xlau and brc-dd authored Mar 7, 2024
1 parent 2b40266 commit 59183e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node/contentLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[],
{
Expand All @@ -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

Expand Down

0 comments on commit 59183e9

Please sign in to comment.