You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to move a few things we have to use vite and it's going well so far except with the storybook side of things.
If you install the @emotion/react and @emotion/styled packages, mdx files no longer render.
The components render but when you try to load the docs you get presented with an error when trying to view the docs/mdx files:
DocsPage.js?v=5882c46e:45 Uncaught TypeError: Cannot read properties of undefined (reading 'content')
at DocsPage.js?v=5882c46e:45:34
at handleInterpolation2 (emotion-serialize.browser.esm.js:137:24)
at serializeStyles4 (emotion-serialize.browser.esm.js:251:15)
at emotion-styled-base.browser.esm.js:114:24
at emotion-element-699e6908.browser.esm.js:35:12
at renderWithHooks (react-dom.development.js:14985:18)
at updateForwardRef (react-dom.development.js:17044:20)
at beginWork (react-dom.development.js:19098:16)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:3945:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:16)
react-dom.development.js:20085 The above error occurred in the <Styled(div)> component:
at http://localhost:61476/node_modules/.vite/@emotion_styled.js?v=5882c46e:1170:45
at MDXProvider2 (http://localhost:61476/node_modules/.vite/chunk-2YJ4K74A.js?v=5882c46e:121:46)
at ThemeProvider2
at SourceContainer (http://localhost:61476/node_modules/@storybook/addon-docs/dist/esm/blocks/SourceContainer.js:97:23)
at DocsContainer (http://localhost:61476/node_modules/@storybook/addon-docs/dist/esm/blocks/DocsContainer.js:47:22)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
POST http://localhost:61476/runtime-error 404 (Not Found)
I found that there were some hacky suggestions in #113 but these didn't help anyway 🤔 what is the 'correct' or expected way to allow the usage of emotion with storybook-builder-vite?
I'm currently trying to move a few things we have to use vite and it's going well so far except with the storybook side of things.
If you install the
@emotion/react
and@emotion/styled
packages, mdx files no longer render.The components render but when you try to load the docs you get presented with an error when trying to view the docs/mdx files:
I found that there were some hacky suggestions in #113 but these didn't help anyway 🤔 what is the 'correct' or expected way to allow the usage of emotion with
storybook-builder-vite
?Minimum reproduction: https://github.com/Codex-/storybook-vite-react-emotion
Any help or advice is appreciated 😅
The text was updated successfully, but these errors were encountered: