-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Support webpack4 modules format #3576
Conversation
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, the fileName
was added to make it available during this storyshots a.k.a. running in node.
Does it still happen (I assume that it does, since all the tests are passing)?
@igor-dv - there were no tests against "real" module variable. |
Thank you @theKashey that's pretty advanced for a first PR 🙇 What are potential negative side effects of this? |
There is only one drawback - I could guarantee that this will work for old node.js versions, but could not say the same for the older webpack versions. But this is not the case. |
@igor-dv do you agree we can merge this? |
Yeah. Does it make sense to mark it as breaking change? |
Yes, 4.0.0 material for sure. |
Congrats on your first merged PR @theKashey |
Will send more :) |
Released as |
Issue: storybook 4.0.0 does not pass
filename
to story context, as long module.filename is not defined.What I did
I've changed module.filename to module.name, and added one test, to test
storyOf
function agains realmodule
variable. (double checked in browser)How to test
As usual. But you might need run storybook to test integration with webpack in real.
Not sure about keeping old way for accessing fileName, but, look like, it's obsolete.