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 <40380293+brc-dd@users.noreply.github.com>
  • Loading branch information
0xlau and brc-dd committed 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
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.