Skip to content

Commit 76e9fe8

Browse files
authored
Revert "fix(build): respect srcExclude in content loader" (#2975)
* Revert "fix(build): respect srcExclude in content loader (#2963)" This reverts commit 3023b5c. * keep changes in dynamicRoutesPlugin.ts
1 parent 3023b5c commit 76e9fe8

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

Diff for: src/node/config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export async function resolveConfig(
9797
const config: SiteConfig = {
9898
root,
9999
srcDir,
100-
srcExclude: userConfig.srcExclude || [],
101100
assetsDir,
102101
site,
103102
themeDir,

Diff for: src/node/contentLoader.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ export function createContentLoader<T = ContentData[]>(
106106
// the loader is being called directly, do a fresh glob
107107
files = (
108108
await glob(pattern, {
109-
cwd: config.srcDir,
110-
ignore: ['**/node_modules/**', '**/dist/**', ...config.srcExclude]
109+
ignore: ['**/node_modules/**', '**/dist/**']
111110
})
112111
).sort()
113112
}

Diff for: src/node/plugin.ts

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ import { webFontsPlugin } from './plugins/webFontsPlugin'
2828
import { slash, type PageDataPayload } from './shared'
2929
import { deserializeFunctions, serializeFunctions } from './utils/fnSerialize'
3030

31+
declare module 'vite' {
32+
interface UserConfig {
33+
vitepress?: SiteConfig
34+
}
35+
}
36+
3137
const themeRE = /\/\.vitepress\/theme\/index\.(m|c)?(j|t)s$/
3238
const hashRE = /\.(\w+)\.js$/
3339
const staticInjectMarkerRE =

Diff for: src/node/shims.d.ts

-7
This file was deleted.

Diff for: src/node/siteConfig.ts

-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ export interface SiteConfig<ThemeConfig = any>
216216
> {
217217
root: string
218218
srcDir: string
219-
srcExclude: string[]
220219
site: SiteData<ThemeConfig>
221220
configPath: string | undefined
222221
configDeps: string[]

0 commit comments

Comments
 (0)