Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/lib/core-server/src/utils/StoryIndexGenerator.ts
Original file line number Diff line number Diff line change
@@ -170,8 +170,8 @@ export class StoryIndexGenerator {
);
}

isStoryFile(absolutePath: Path) {
return /(\.(js|jsx|ts|tsx)|\.stories\.mdx)$/i.test(absolutePath);
isDocsMdx(absolutePath: Path) {
return /(?<!\.stories)\.mdx$/i.test(absolutePath);
}

async ensureExtracted(): Promise<IndexEntry[]> {
@@ -180,7 +180,7 @@ export class StoryIndexGenerator {
// files may use the `<Meta of={XStories} />` syntax, which requires
// that the story file that contains the meta be processed first.
await this.updateExtracted(async (specifier, absolutePath) =>
this.isStoryFile(absolutePath) ? this.extractStories(specifier, absolutePath) : false
this.isDocsMdx(absolutePath) ? false : this.extractStories(specifier, absolutePath)
);

if (!this.options.docs.disable) {

0 comments on commit b4dc612

Please sign in to comment.