TypeError: MiniCssExtractPlugin is not a constructor

There is an open issue for this on the create-react-app repository. It looks like this comment has a temporary fix of adding the following to file package.json:

The below works if you’re using Yarn:

"resolutions": {
    "mini-css-extract-plugin": "2.4.5"
},

Use the command below for npm:

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

Update: As of January 17, it appears that this issue is fixed by mini-css-extract-plugin v2.5.1. You should be able to remove the version pin created above and npm i or yarn install to update.

Leave a Comment