Webpack installed css-loader,style-loader, but there was an error using minimize in the configuration item

the version of webpack used is 3.10.0. There is no problem without the option of minimize. Is it the version problem, webpack rookie, webpack

Asset Size Chunks Chunk Names
bundle.js 17.9 kB 0 [emitted] main
[0]. / src/index.js 91 bytes {0} [built]
[1]. / src/style/base.css 1.2 kB {0} [built]
[2]. / style/base.css 374bytes {0} [built] [failed] [1 error]
[5]. / src/sayHello.js 142bytes {0} [built]

+ 2 hidden modules

ERROR in. / node_modules/_css-loader@2.1.0@css-loader/dist/cjs.js??ref--0-1 ERROR in. CSS Loader Invalid Options.
Module build failed: ValidationError: CSS Loader Invalid Options

options should NOT have additional properties

at validateOptions (D:\Code\webpackTest\node_modules\_schema-utils@1.0.0@schema-utils\src\validateOptions.js:32:11)
at Object.loader (D:\Code\webpackTest\node_modules\_css-loader@2.1.0@css-loader\dist\index.js:44:28)

@. / src/style/base.css 2:14-107
@. / src/index.js
npm ERR! Code ELIFECYCLE
npm ERR! Errno 2
npm ERR! Webpack@1.0.0 start: webpack-config webpack.config.js
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the webpack@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAdministratorAppDataRoamingnpm-cache_logs2019-01-07T07_47_44_088Z-debug.log

Apr.16,2022

version, the minimize attribute has been removed


what is the version of your css-loader? Minimize has been cancelled since 1.0.0

remove minimize option, use postcss-loader with cssnano or use optimize-cssnano-plugin plugin

Menu