-
-
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
Migration to Storybook 5. Custom webpack config #6083
Comments
i am encountering the same issue. |
Same issue here. |
1 similar comment
Same issue here. |
Me too. I originally thought it was related to #5949 but the comments in this issue are exactly what I am experiencing. |
Same issue here. |
So the answer is basically to not use extend mode then? @shilman |
@gburning I've fixed it to unbreak people's migration from v4. But I've also deprecated it because I think it's basically a bad idea. Use full-control mode instead, even tho it requires you to understand more about what's going on. |
Gadzooks!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.7 containing PR #6104 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
@gburning @mercury-oe This release fixes "extend-mode". I'll patch it back into |
I updated my storybook project to v5.1.0-alpha.7 and tried to use custom webpack config config for extend mode
config for full-control mode
In extend mode al works fine, but in full-control mode I have the same errors. Maybe I'm using full-control mode incorrectly?
|
@mercury-oe Glad to hear that extend mode works for you as expected. As for full-control mode, you can see the final webpack config by passing The difference between extend mode and full-control mode is that the config object you're merging with in full-control mode contains the default storybook rules and extend-mode does not. |
This issue appears when project is using css-modules, by default storybook css rule looks like this {
loader: 'css-loader',
options: {
importLoaders: 1,
}
} This rule is present at 3rd index i.e. |
the solution that worked for me is here (just remove |
it works for me too |
@shilman there is no documentation of full-control vs. extend mode in the docs. Could you add that documentation and provide explicit examples of custom vs extended webpack configuration? Edit: However, the configuration that is suggested in the docs I mentioned above will still trigger the deprecation warning. |
@liamsc Extend mode has been deprecated a year ago. All current documentation should use full-control mode, which is the recommended way to configure webpack since 5.0 |
@shilman can you confirm that this documentation section uses full-control mode? In addition, you will notice the documentation references "either" yet it only provides one option. Can this be clarified?
|
This is still an issue. Are we supposed to remove the default CSS rule as standard guidance? |
Hi guys!
I'm trying to migrate my Storybook library from 4.x to 5.0.1.
I'm using my custom webpack config.
In Storybook 4 all works fine, but in storybook 5 all crashes when i'm using same webpack config.
In console after
yarn storybook
i see this errors types for every css filesMy custom webpack config
Storybook 4
webpack.config.js
Storybook 5
webpack.config.js
loader config
'css.js'
** Storybook dependencies **
System:
The text was updated successfully, but these errors were encountered: