Closed sderickson closed 1 year ago
@sderickson Thanks, glad it is of use for you. I am looking into this but if you fnd a solution for it please don't hassitate to open a PR, all contributions are welcome
@sderickson This should be resolved now.
The problem was that the custom webpack config was overiding the rules that come by default from storybook webpack config, somehow there is a problem to merge them with the custom rules. Therefore the mdx loaders for webpack where not lodead. I figured that the cutom rules are redundant.
The solution: i added vite as a dev dependency and @storybook/react-vite to build and render stortybook correctly. It should not affect your component library buld.
First of all, thanks for this great boilerplate! I've been using it the last couple months and it's a well-put-together setup. I really appreciate you putting this out there and actively maintaining it 🙏
So, I'm looking to add mdx files to my project, but
yarn start
breaks when I do. For reference I copied 01e497546b5328dd6c40422260e0147bab841be8 and so I see you have since added mdx support in https://github.com/KaiHotz/react-rollup-boilerplate/commit/bd447c3fbe7b1d2714cd3dc08224c2a6f4194bb9. I tried applying these changes and some other dep updates in your other commits but I'm still running into it. I then cloned this repo and tried adding anmdx
file and I see the same error, so perhaps there's a bug in the setup?Steps to repro:
/src/components/Button/Test.story.mdx
# hello mdx
.yarn start
Expected: Storybook starts and includes a Test page with markdown file contents rendered.
Actual:
yarn start
errors: