mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 20:51:07 +08:00
Merge pull request #30981 from storybookjs/jeppe/exclude-node-modules-from-docgen
Svelte: Exclude `node_modules` from docgen
This commit is contained in:
commit
88639789ce
@ -135,10 +135,11 @@ function transformToSvelteDocParserDataItems(docgen: Docgen): SvelteDataItem[] {
|
||||
export async function svelteDocgen(svelteOptions: Record<string, any> = {}): Promise<PluginOption> {
|
||||
const cwd = process.cwd();
|
||||
const { preprocess: preprocessOptions, logDocgen = false } = svelteOptions;
|
||||
const include = /\.(svelte)$/;
|
||||
const include = /\.svelte$/;
|
||||
const exclude = /node_modules\/.*/;
|
||||
const { createFilter } = await import('vite');
|
||||
|
||||
const filter = createFilter(include);
|
||||
const filter = createFilter(include, exclude);
|
||||
const sourceFileCache = createDocgenCache();
|
||||
|
||||
let docPreprocessOptions: Parameters<typeof preprocess>[1] | undefined;
|
||||
|
Loading…
x
Reference in New Issue
Block a user