1

I want to integrate my theme from styled-components to styleguidist. According official docs I've created ThemeWrapper and added this into config:

...
const path = require('path');

const styleguideComponents = {
  Wrapper: path.join(__dirname, '/srs/styled-components/ThemeWrapper.tsx'),
};
...

module.exports = {
  ...
  styleguideComponents,
  ...
};

But when I try to build it next error appears:

Module not found: Can't resolve 'rsg-components/Wrapper' in '/My/User/Folder/Desktop/trello/front-end/node_modules/react-styleguidist/lib/rsg-components/ReactExample'

Probably the path is not correct. What is the right one, and how to change it?

Gordienko R.
  • 331
  • 4
  • 16

1 Answers1

0

Well, after changing component mask in styleguidist config, it works fine. I thing the problem was with loading default styleguidist page(as mentioned in error message), and after actual component were added, the error doesn't appear anymore.

Gordienko R.
  • 331
  • 4
  • 16