PostCSS Loader 错误: ValidationError: Invalid options object - 解决方法
这段代码报错的原因是因为使用了不符合 API schema 的 options 对象来初始化 PostCSS Loader。具体来说,该 options 对象中包含了一个未知的属性 'plugins',而正确的属性应该是 'postcssOptions'、'execute'、'sourceMap' 和 'implementation'。
可能的情况是,该代码在使用旧版本的 PostCSS Loader,而在新版本中 API schema 发生了变化,导致使用了不兼容的 options 对象。解决方法是更新 PostCSS Loader 版本,或者按照新的 API schema 重新配置 options 对象。
原文地址: https://www.cveoy.top/t/topic/l1JK 著作权归作者所有。请勿转载和采集!