Right now to use Redux providers, React Intl, Relay etc. you need to use webpack aliases like this:
// styleguide.config.js
const path = require('path');
module.exports = {
webpackConfig: {
resolve: {
alias: {
'rsg-components/Wrapper': path.join(__dirname, 'lib/styleguide/Wrapper')
}
}
}
};
I think we have enough use cases to add a special config option for that. It could look like this:
// styleguide.config.js
const path = require('path');
module.exports = {
styleguideComponents: {
Wrapper: path.join(__dirname, 'lib/styleguide/Wrapper')
}
};
I think ,we don't need config option for that.
Webpack aliases is simple to understand.
And i think that aliases like this (with full path)
alias: {
'./node_module/react-styleguidist/rsg-components/Wrapper': pathToYourComponent
}
is more simple to understand and more simple for override.
when i see 'rsg-components/Wrapper' i can't understand what is rsg-components wrapper.
It looks like another package
That鈥檚 a good reason to have a simple to understand option ;-)
:D
There鈥檚 a PR: https://github.com/styleguidist/react-styleguidist/issues/504 ;-)
Released in 5.5.0.