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_第1张图片

解决方案

npm i -D --save-exact [email protected]

React项目build失败之MiniCssExtractPlugin_第2张图片

你可能感兴趣的:(react.js)