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
I build a component in react using NextJS and use next-routes as the router. So I create routes.js inside project and export by CommonJS syntax for compatible with custom server.js to require modules.
The component in the project that runs by NextJS works well with import syntax. But the same component that runs in the storybook environment cannot find modules that export from CommonJS file (routes.js)
To Reproduce
Steps to reproduce the behavior:
Import function that export from CommonJS file
Render component in the story file
Expected behavior
I think this should work in the storybook environment same the NextJS environment
But importing it cause the storybook to yell
`Module not found: Error: Can't resolve 'the-component' in 'my/custom/route'
even route is correctly defined.
Wonder if there is anything needed to be done in the webpack.config.js in .storybook/ folder so maybe storybook do not compile it? not really sure what is the issue at this point.
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Describe the bug
I build a component in react using NextJS and use next-routes as the router. So I create routes.js inside project and export by CommonJS syntax for compatible with custom server.js to require modules.
The component in the project that runs by NextJS works well with import syntax. But the same component that runs in the storybook environment cannot find modules that export from CommonJS file (routes.js)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I think this should work in the storybook environment same the NextJS environment
Code snippets
routes.js
Hello.js
And show error like this in Storybook console
System:
The text was updated successfully, but these errors were encountered: