-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Missing support for webpack2 config with rules
#292
Comments
It shouldn’t be a problem in the 5.0.0 beta. Could you please try it? https://github.com/styleguidist/react-styleguidist/releases/tag/5.0.0%40beta.9 |
Indeed, it does work with the latest beta: styleguidist/example#2 As a workaround for folks who are on react-styleguidist <=4.* : updateWebpackConfig(webpackConfig, env) {
webpackConfig.module.rules = webpackConfig.module.loaders.concat([
// your custom rules here
]);
webpackConfig.module.loaders = [];
return webpackConfig;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using webpack2 with a custom config which uses
module.rules
instead ofmodule.loaders
fails to load.The issue is due to webpack loading either
rules
orloaders
, but not both: https://github.com/webpack/webpack/blob/v2.2.0/lib/NormalModuleFactory.js#L46And
react-styleguidist
only exportsloaders
: https://github.com/styleguidist/react-styleguidist/blob/master/scripts/make-webpack-config.js#L82See demo: https://github.com/avaly/react-styleguidist-example/tree/webpack2-rules
The text was updated successfully, but these errors were encountered: