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
Describe the bug
Preview doesn't render the svg files imported as a React component correctly even with the custom webpack config. It always looks for the svg file under static/media.
To Reproduce
Steps to reproduce the behavior:
import the svg as a React component
import Logo from "../icons/logo.svg";
export function container() {
return <div>
<Logo />
</div>;
}
Run "start-storybook -p 6006 -c .storybook"
Storybook ui is loaded with the preview of components. Error is shown on the preview of the container component.
Failed to execute 'createElement' on 'Document': The tag name provided ('static/media/logo.717fead6.svg') is not a valid name.
Error: Failed to execute 'createElement' on 'Document': The tag name provided ('static/media/logo.717fead6.svg') is not a valid name.
Expected behavior
The component is rendered correctly with the svg file.
Describe the bug
Preview doesn't render the svg files imported as a React component correctly even with the custom webpack config. It always looks for the svg file under static/media.
To Reproduce
Steps to reproduce the behavior:
Run "start-storybook -p 6006 -c .storybook"
Storybook ui is loaded with the preview of components. Error is shown on the preview of the container component.
Failed to execute 'createElement' on 'Document': The tag name provided ('static/media/logo.717fead6.svg') is not a valid name.
Error: Failed to execute 'createElement' on 'Document': The tag name provided ('static/media/logo.717fead6.svg') is not a valid name.
Expected behavior
The component is rendered correctly with the svg file.
Code snippets
webpack.config.js
System:
The text was updated successfully, but these errors were encountered: