webpack package css error report (solved): UnhandledPromiseRejectionWarning: TypeError: this.getResolve is not a function

Beginners are easy to step on a pit that is too high in learning webpack

This is an error that occurred when I used webpack to package css. The css could not be packaged
because the versions of css-loader and style-loader were too high.
Insert picture description here
Solution: This is the version information of my original package.json.
Insert picture description here
Now I manually lower it. Version

 "css-loader": "^3.3.0",
    "style-loader": "^1.0.0"

Then enter in the command line one by one:

npm install
npm dev

Reinstall the project dependencies, and then use webpack to package again and find that css can be packaged successfully~ The
Insert picture description here
following website can view the version information of css-loader and style-loader
https://www.npmjs.com/package/style-loader
https:// www.npmjs.com/package/css-loader

Guess you like

Origin blog.csdn.net/qq_43377853/article/details/108485499