Webpack configuration error, master please come in

1. At present, I am learning to manually configure webpack to build a react project.
2, all dependent packages are installed successfully,
3. I wonder if it is due to the conflict between the versions of the dependent packages. I mistakenly reported that it was a loader configuration error, but there was no configuration error. Ask for advice. I don"t know what the reason is

.

this error is currently reported

webpack.config.js


Aug.10,2021

The version of

webpack4+ does not have the attribute of loaders, but should be replaced by rules, such as

.
    rules: [
      { test: /\.css$/, use: 'css-loader' },
      { test: /\.ts$/, use: 'ts-loader' }
    ]

unknown does not recognize this loaders
https://www.webpackjs.com/con. has

your mistake is too obvious, take a good look at the document! rules is not loaders

Menu