-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[@types/mini-css-extract-plugin] When using 1.4.1 - not assignable to type 'Plugin' #52202
Comments
This problem was introduced in #52044, which added webpack 5 support but broke webpack 4 support. I think this is fixable and should be fixed, but there seems to be some disagreement on both of these points. Copy of the discussion starting here:
|
Ideally we should have bumped the major version to make the intent clear: the latest version is for v5 and the previous is for v4. If you're still on v4, you can pin the previous version of the types and it'll be fine until you upgrade to the matching version of webpack (v5). We could likely add complexity to try support both in one, but I'm struggling to understand why. You installed the version for a newer webpack than what you have, you can simply go back to the version for v4. Again I think the actual issue here is that we didn't do a major version bump, not that we don't support v4. |
I'll close this issue as there is enough information here for anyone that might come upon similar scenario as I did. |
What I'm using in my project:
webpack
4.46.0webpack-cli
3.3.12mini-css-extract-plugin
1.4.0@types/node
14.14.37.ts
file (TypeScript)Just installed the latest
@types/mini-css-extract-plugin
1.4.1 and I get the following error when I try to build:Differences between
![mini-css-141-issue](https://user-images.githubusercontent.com/16443718/113713502-b9939200-96e7-11eb-99a6-4e7e199903d8.png)
@types/mini-css-extract-plugin
1.4.0 and 1.4.1 type definitions:Note: This all works correctly with
@types/mini-css-extract-plugin
1.4.0The text was updated successfully, but these errors were encountered: