All Articles

React Styleguidist

react-styleguidist tries to load the default Webpack configuration that is provided by create-react-app. That works just like magic out of the box.

But if you are using react-scripts-rewired it will not work out of the box.

The trick is to point the styleguide to the right webpack configuration:

module.exports = {
    webpackConfig: require('react-scripts-rewired/config/webpack.config.dev.extend'),
}