diff --git a/src/node/config.ts b/src/node/config.ts index 8938fcfa6ca6..9e4831de65a1 100644 --- a/src/node/config.ts +++ b/src/node/config.ts @@ -23,6 +23,7 @@ export interface UserConfig { markdown?: MarkdownOptions customData?: any vueOptions?: VuePluginOptions + exclude?: string[] } export interface SiteConfig { @@ -57,7 +58,7 @@ export async function resolveConfig( root, site, themeDir, - pages: await globby(['**.md'], { cwd: root, ignore: ['node_modules'] }), + pages: await globby(['**.md'], { cwd: root, ignore: ['**/node_modules', ...userConfig.exclude || [] ] }), configPath: resolve(root, 'config.js'), outDir: resolve(root, 'dist'), tempDir: path.resolve(APP_PATH, 'temp'),