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
When importing [email protected] (latest) into a Component that is to be displayed in a Story in storybook, the storybook build breaks with:
Module not found: Error: Can't resolve 'unfetch' in '/Users/martaver/Projects/repro/node_modules/isomorphic-unfetch'
and several:
odule build failed: UnhandledSchemeError: Reading from "node:buffer" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
However, since the same build error does NOT occur in next's build, I thought I'd flag this for the storybook team, since this suggests that storybook is doing something different in its build to next and I was under the impression that storybook should be utilising the same build configuration as next.
Note the repro is in branch next-storybook-isomorphic-unfetch!
Run npm run storybook and check out the Button component. It imports isomorphic-unfetch without using it, which causes the aforementioned build errors.
Describe the bug
When importing
[email protected]
(latest) into a Component that is to be displayed in a Story instorybook
, thestorybook
build breaks with:and several:
of varying imports.
This might be simply a problem with
isomorphic-unfetch
, e.g. I know there is a problem with exports inunfetch
:developit/unfetch#162
developit/unfetch#164
However, since the same build error does NOT occur in
next
's build, I thought I'd flag this for thestorybook
team, since this suggests thatstorybook
is doing something different in its build tonext
and I was under the impression thatstorybook
should be utilising the same build configuration asnext
.To Reproduce
https://github.com/cleric-sh/repro/tree/next-storybook-isomorphic-unfetch
Note the
repro
is in branchnext-storybook-isomorphic-unfetch
!Run
npm run storybook
and check out theButton
component. It importsisomorphic-unfetch
without using it, which causes the aforementioned build errors.System
Additional context
No response
The text was updated successfully, but these errors were encountered: