Really excited to see SB moving to Vite in RW !
We got 2 problems that are maybe unique to our case, but I didn’t find a way to solved them.
1.: We cannot load stories because of this error :
Attempted to resolveName for an unsupported path. resolveName does not accept ObjectMethod". (x2)
2:41:26 PM [vite] Internal server error: Attempted to resolveName for an unsupported path. resolveName does not accept ObjectMethod".
Plugin: storybook:react-docgen-plugin
File: /Users/simongagnon/Dev/leftlane_app/utils/dist/chunk-TED5DSF4.mjs
at resolveName (/Users/simongagnon/Dev/leftlane_app/node_modules/react-docgen/dist/utils/getMemberExpressionValuePath.js:46:11)
[...]
The file is from our shared package that contains TS functions. I look like it trying to read it as a React file unsuccessfully.
2.: We have a custom webpack config for storybook that allows us to run mock function like mockGraphQLQuery
in prod storybook. We do need mock in prod because we use SB test runner and on CI it’s way faster to build SB first and then run test than doing it as local dev. It’s also required for Chromatic to run. I didn’t put that much effort to find an alternative to webpackFinal
for SB config file, but I’m curious to know if it’s possible to add mock in prod?
Thank you for this effort of making Vite SB possible in RW, I will try to put more time finding solutions to these issues.