Tag Archives: webpack Package Error

[Solved] webpack Package Error: ERROR in multi ./src/main.js ./dist/bundle.js Module not found: Error: Can‘t resolv

When I first came into contact with webpack, I encountered several problems. After successfully installing the latest version of webpack and cli, there was a problem with the first package. In fact, it was also a syntax error

When running webpack .\src\main.js .\dist\bundle.js and packaging, the following error occurs:

Cause of error:

The latest version of the webpack command has changed

Solution:

Add a -o to the previous command.
run webpack .\src\main.js -o .\dist\bundle.js

[Solved] webpack Package Error: TypeError: this.getOptions is not a function style-loader

I used style-loader in the project today, and found an error in packaging: typeerror: this Getoptions is not a function
visual inspection is a version problem. The default version of style-loader is 3.3.1. The reduced version is 2.0.0, and the problem is solved
PS: the webpack version used is 4.28.4