我想整合我的主题,从风格-组件到风格设计师。根据官方的文档,我创建了ThemeWrapper并将其添加到配置中:
...
const path = require('path');
const styleguideComponents = {
Wrapper: path.join(__dirname, '/srs/styled-components/ThemeWrapper.tsx'),
};
...
module.exports = {
...
styleguideComponents,
...
};但是,当我试图构建它时,下一个错误会出现:
找不到模块:无法解析'/My/User/Folder/Desktop/trello/front-end/node_modules/react-styleguidist/lib/rsg-components/ReactExample‘中的“rsg-组件/包装器”
可能这条路不对。什么是正确的,如何改变它?
发布于 2018-09-10 11:41:24
那么,在更改了styleguidist配置中的组件掩码之后,它就可以正常工作了。我认为问题在于加载默认的styleguidist页面(正如错误消息中提到的那样),在添加了实际组件之后,错误就不再出现了。
https://stackoverflow.com/questions/52077361
复制相似问题