modernweb-dev / storybook-prebuilt

Storybook prebuilt to work with native es modules
MIT License
37 stars 9 forks source link

Can put a demo to use storybook mdx format? #96

Closed yhjhoo closed 2 years ago

yhjhoo commented 2 years ago

I have referred this document, couldn't figure out a way to do it.

https://modern-web.dev/docs/dev-server/plugins/storybook/

Westbrook commented 2 years ago

Sorry for the delay on this, but it seems that MDX hasn't been working as expected for what looks like quite some time. I personally only use JS stories and a lot of other consumers of this project use MDJS, so it never got caught...until now. Looking at surfacing the fix here: https://github.com/modernweb-dev/web/pull/1828 Hopefully, that will get things working for you.

Westbrook commented 2 years ago

This should "just work" when leveraging: https://www.npmjs.com/package/@web/storybook-prebuilt/v/0.1.32 and https://www.npmjs.com/package/@web/dev-server-storybook/v/0.4.1

Check out https://github.com/modernweb-dev/web/blob/master/packages/dev-server-storybook/demo/wc/stories/Button-mdjx-docs.stories.mdx for an example.

Please let us know if you have any further issues or check out the #open-wc room in https://join.slack.com/t/lit-and-friends/shared_invite/zt-llwznvsy-LZwT13R66gOgnrg12PUGqw to discuss your situation with fellow members of the community.

yhjhoo commented 2 years ago

works for me, looks great now.