我用下一个js开始了一个项目,我在下一个js文档中为导入sass文件做了所有事情,但是我遇到了这个错误:
./src/components/Header/test.css
////
ValidationError: Invalid options object. CSS Loader has been initialised using an options object that does not match the API schema.
- options has an unknown property 'minimize'. These properties are valid:
object { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals? }
package.json
"devDependencies": {
"node-sass": "^4.12.0",
....
}
"dependencies": {
"@zeit/next-css": "^1.0.1",
"@zeit/next-sass": "^1.0.1",
"next": "^9.0.6",
....
next.config.js
const withSass = require('@zeit/next-sass');
const withCSS = require('@zeit/next-css');
module.exports = withCSS(withSass());
我的文件
import "./test.css";
const Header = (props) => {
console.log(props);
return (
<div className="header clearfix ">
<div className="wrapper clearfix">
Test
</div>
</div>
)
}