-
Notifications
You must be signed in to change notification settings - Fork 55
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
Storybook: TypeError: module.ReactComponent is not a function #50
Comments
Any progress on this? My versions are a little bit newer, but the issue remains
|
Sorry I didn't remember this was open.
|
@andresgutgon could we keep it open? I'm not sure that integrating alpha version of Storybook into a project is the best idea (not a pet project I mean). And who knows when 7.0.0 will be out Or what is the common approach for such issues? |
It was not an issue at all in our case. And we have quite some amount of code already. I would try to update and see if you find some issues |
In any case I'll reopen. No problem |
Oh, actually, I may've found the issue.
So one should add the plugin into both const { mergeConfig } = require('vite');
const svgr = require("vite-plugin-svgr");
module.exports = {
async viteFinal(config) {
return mergeConfig(config, {
plugins: [svgr()]
});
},
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions"
],
"framework": "@storybook/react",
"core": {
"builder": "@storybook/builder-vite"
},
"features": {
"storyStoreV7": true
}
} |
The issue
Hi, we're trying to move
vite-plugin-svgr
to latest version but we're getting this error.We load our SVGs components in async mode with a code like this:
Versions
Storybook:
6.5.10
Vite
2.9.13
vite-plugin-svgr:
2.2.1
Any idea of what could be the issue. I see that you did a big change in the way the React component is created but I don't know how to relate to Vite version.
The latest version that is working for us is Vite
1.1.0
The text was updated successfully, but these errors were encountered: