From c1b7e13b2e72e4a6f2458930bcff86aa6dc602ae Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Mon, 23 Jun 2025 21:52:27 +0530 Subject: [PATCH] allow using createContentLoader.load without files argument --- src/node/contentLoader.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node/contentLoader.ts b/src/node/contentLoader.ts index 7de87c1a..43009d3c 100644 --- a/src/node/contentLoader.ts +++ b/src/node/contentLoader.ts @@ -4,7 +4,6 @@ import path from 'node:path' import { normalizePath } from 'vite' import type { SiteConfig } from './config' import { createMarkdownRenderer } from './markdown/markdown' -import type { LoaderModule } from './plugins/staticDataPlugin' import type { Awaitable } from './shared' import { glob, normalizeGlob, type GlobOptions } from './utils/glob' @@ -76,7 +75,7 @@ export function createContentLoader( */ watch: string | string[], options: ContentOptions = {} -): LoaderModule { +) { const config: SiteConfig = (global as any).VITEPRESS_CONFIG if (!config) { throw new Error(