React项目build失败之MiniCssExtractPlugin

React项目build失败之MiniCssExtractPlugin React项目,最新依赖"mini-css-extract-plugin": "^2.5.0"会导致项目npm run build失败:

node_modules/react-scripts/config/webpack.config.js:664 new MiniCssExtractPlugin({ ^TypeError: MiniCssExtractPlugin is not a constructor

【React项目build失败之MiniCssExtractPlugin】React项目build失败之MiniCssExtractPlugin
文章图片

解决方案:
npm i -D --save-exact mini-css-extract-plugin@2.4.5

React项目build失败之MiniCssExtractPlugin
文章图片

    推荐阅读