我@zeit/next-css
用来将css文件导入到我的组件和页面文件中,但是却抛出了这个错误
./styles/navbar.css
导入此css文件到我的navbar.js
in组件中,出现此错误
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? }
我next.config.js
放在哪里package.json
是
const withCSS = require("@zeit/next-css");
module.exports = withCSS();
我的包json
{
"name": "transfer-to",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@zeit/next-css": "^1.0.1",
"isomorphic-unfetch": "^3.0.0",
"next": "9.0.7",
"react": "16.10.2",
"react-dom": "16.10.2"
}
}
为了临时解决您的问题,请从以下软件包中删除“ ^”符号:
这些软件包的更新版本似乎有问题。