Skip to content

Commit

Permalink
Merge pull request #18740 from storybookjs/yann/sb-414-sb18395-cannot…
Browse files Browse the repository at this point in the history
…-anchor-to-headings-in-mdx

Addon docs: Pass remarks plugins to mdx loader
  • Loading branch information
shilman committed Sep 28, 2022
1 parent 610073b commit 9d677f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/docs/src/preset.ts
Expand Up @@ -53,6 +53,7 @@ export async function webpack(
} = options;

const mdxLoaderOptions = {
// whether to skip storybook files, useful for docs only mdx or md files
skipCsf: true,
remarkPlugins: [remarkSlug, remarkExternalLinks],
};
Expand Down Expand Up @@ -123,6 +124,10 @@ export async function webpack(
},
{
loader: mdxLoader,
options: {
...mdxLoaderOptions,
skipCsf: false,
},
},
],
},
Expand Down

0 comments on commit 9d677f6

Please sign in to comment.