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 can't run within an ESM package #16181
Comments
That circumvents the issue though because we still need to run |
Wen switching to |
So what's the solution to make it work? Still cannot import an ESM package into some storybooks here. |
@binarykitchen I was able to get it working by creating an empty I do suspect it's a bug in storybook that we can't just name the file |
Running Storybook v6.4.18 and renaming the extension to |
@tyler-boyd Worked for me with SvelteKit 1.0.0-next.320, but apart from this change i had to replace Didn't need to rename |
Why this issue closed?.. |
Still not working for me neither, I have the builder-vite, my confing in TypeScript and my project in ESM and I cannot start storybook.
|
Changing file extension |
Then you lose the benefit of ts. We try to avoid any commonjs file in our project. I would still prefer a complete support of ESM by storybook to avoid these tricky workaround that no one knows the exact working solution. |
Describe the bug
I can't run the storybook within an ESM package (
"type": "module"
inpackage.json
).To Reproduce
https://github.com/issueset/storybook-esm-issue
System
Additional context
Since Storybook will remove CJS in 7.0 itself, then I expect it has a better support to an ESM-only project. Or at least has better document about how to use storybook in an ESM-only project.
The text was updated successfully, but these errors were encountered: