VulcanJS / vulcan-next

The Next starter for GraphQL developers
http://vulcan-docs.vercel.app
MIT License
395 stars 29 forks source link

Can't set Storybook addons-docs with MDX + MDX for the app itself #57

Closed eric-burel closed 4 years ago

eric-burel commented 4 years ago

In .storybook/main.js:

    // add mdx support
    // @see https://mdxjs.com/getting-started/webpack
    withVulcan.module.rules.push({
      test: /\.mdx?$/,
      use: ["babel-loader", "@mdx-js/loader"],
    });
    // Bypass interference with Storybook doc, which already set a conflicting rule for .md import
    // @see https://github.com/storybookjs/storybook/issues/7644#issuecomment-592536159
    withVulcan.module.rules = [
      ...withVulcan.module.rules.filter(
        (rule) => rule.test.source !== "\\.md$"
      ),
    ];

This seems to raise issues with Storybook Addon Docs MDX support.

See "src/components/ui/stories/0_mdx-example.stories.mdx", the story is never loaded.

eric-burel commented 4 years ago

Seems fix