我将react styleguidist添加到我的项目中。现在,当运行npm run styleguidist时,出现错误ReferenceError:进程未定义
我的styleguide.config.js:
module.exports = {
title: 'Style Guide',
pagePerSection: true,
sections: [{
name: 'components',
sectionDepth: 1,
components: './src/components/button.jsx'
},
],
}发布于 2021-05-31 19:46:55
鉴于您没有添加关于设置的任何解释,我将在我的响应中做出许多假设。您使用的是哪个版本的webpack?我认为这可能与v5有关,因为它不再使用进程依赖,而styleguidist仍然依赖于v4。
您可以通过更新您的webpack配置来暂时解决此问题:
plugins:[
new webpack.DefinePlugin({
process: { env: {} }
})
]https://stackoverflow.com/questions/67148312
复制相似问题