Revert "fix(build): respect srcExclude in content loader" (#2975)

* Revert "fix(build): respect srcExclude in content loader (#2963)"

This reverts commit 3023b5c76b.

* keep changes in dynamicRoutesPlugin.ts
pull/2977/head
Divyansh Singh 10 months ago committed by GitHub
parent 3023b5c76b
commit 76e9fe86b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -97,7 +97,6 @@ export async function resolveConfig(
const config: SiteConfig = {
root,
srcDir,
srcExclude: userConfig.srcExclude || [],
assetsDir,
site,
themeDir,

@ -106,8 +106,7 @@ export function createContentLoader<T = ContentData[]>(
// the loader is being called directly, do a fresh glob
files = (
await glob(pattern, {
cwd: config.srcDir,
ignore: ['**/node_modules/**', '**/dist/**', ...config.srcExclude]
ignore: ['**/node_modules/**', '**/dist/**']
})
).sort()
}

@ -28,6 +28,12 @@ import { webFontsPlugin } from './plugins/webFontsPlugin'
import { slash, type PageDataPayload } from './shared'
import { deserializeFunctions, serializeFunctions } from './utils/fnSerialize'
declare module 'vite' {
interface UserConfig {
vitepress?: SiteConfig
}
}
const themeRE = /\/\.vitepress\/theme\/index\.(m|c)?(j|t)s$/
const hashRE = /\.(\w+)\.js$/
const staticInjectMarkerRE =

@ -1,7 +0,0 @@
import 'vite'
declare module 'vite' {
interface UserConfig {
vitepress?: import('./config').SiteConfig
}
}

@ -216,7 +216,6 @@ export interface SiteConfig<ThemeConfig = any>
> {
root: string
srcDir: string
srcExclude: string[]
site: SiteData<ThemeConfig>
configPath: string | undefined
configDeps: string[]

Loading…
Cancel
Save