-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue/MDX migration to v6.0 - h is not defined #11094
Comments
This is an issue with the Vue jsx preset attempting to process and mdx file, I believe. There's a work around though, you should read through this thread, starting with the linked comment: storybookjs/vue-cli-plugin-storybook#73 (comment) |
@Aaron-Pool thank you for your help. I was able to get the MDX docs working properly based on your babel.config.js. It does not seem to work however with One thing I did notice though, was that with the above
I don't currently use JSX in my stories, so this isn't a big problem for me personally, but it seems like an issue worth raising for discussion/visibility. I've also updated my previously mentioned repo with working examples in case anyone needs it as a reference in the future: https://github.com/ksaturnius/sb6-vue-jsx-issue |
@ksaturnius if I recall correctly, if you continue reading through that thread, you'll see that we refined the work around to work with everything except Vue jsx stories inside of |
I got this error too and fix with
Also I found something like this:
but |
@Aaron-Pool got it, thank you 🙏 I've updated my example repo now, so everything is working except JSX in MDX as you mentioned. https://github.com/ksaturnius/sb6-vue-jsx-issue |
Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.29 containing PR #11185 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
Describe the bug
I've been incrementally working through the v6 beta versions to try and solve an issue I raised originally in #10817. As of
beta.23
I have a working, fully migrated version of our Vue.js Storybook, except for the MDX docs functionality (which had been working as of 5.3.18). Now, when I try to access any MDX docs, I get the following error:In 5.3.18, I had been using the workaround here to configure
addon-docs
to use a tweaked version of the babel config. However, this workaround is no longer working in v6. I have also tried upgrading to@vue/babel-preset-jsx
as per the vue-kitchen=sink example with no luck.To Reproduce
I've created an example repo here: https://github.com/ksaturnius/sb6-vue-jsx-issue
This is based off of the following steps:
npx -p @storybook/cli sb init --type vue
@storybook/addon-docs
@storybook
dependencies to6.0.0-beta.23
@vue/babel-preset-jsx
System:
Environment Info:
The text was updated successfully, but these errors were encountered: