This error occurs when packaging with postcss: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
I’ve been searching for information for a long time because the versions are incompatible,
Solution: create a new postcss.config.js file under the root directory
The file configuration is as follows
module.exports={
plugins:[
require("postcss-preset-env")
]
}
Then delete the options in webpack.config.js and package again.