-
-
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
Source-loader: Warn if applied to non-stories file #8773
Source-loader: Warn if applied to non-stories file #8773
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/l2lrut76i |
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.
Thanks @donaldpipowitch, this is great! Mind updating this to use @storybook/node-logger
instead?
@shilman sure :) Thank you for the fast review. |
@shilman did you meant |
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.
@donaldpipowitch You're right, it's client-logger
@shilman Fixed 👍 |
Source-loader: Warn if applied to non-stories file
Issue: #8294
What I did
I added a warning for people like me who misconfigured the
@storybook/source-loader
. If I understand correctly, it should only be used for files containing stories. In my webpack config it was applied to all source code files.How to test
Checkout my PR,
cd lib/source-loader && yarn prepare && yarn link
. After that$ git clone [email protected]:donaldpipowitch/storybook-bug-demo-source-loader-context-null.git && cd storybook-bug-demo-source-loader-context-null && yarn && yarn link "@storybook/source-loader" && yarn storybook
. You should see the warning.