我正试图让Styleguidist在现有的React环境中运行。
运行时
yarn styleguidist build
我收到这样的错误:
我的styleguide.config.js:
module.exports = {
components: 'src/components/**/[A-Z]*.js',
webpackConfig: {
module: {
rules: [
// Babel loader, will use your project’s babel.config.js
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
// Other loaders that are needed for your components
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
}
}
}