Can not import css after upgrading to v5
//next.config.js
const withCSS = require('@zeit/next-css')
module.exports = withCSS()
//pages/test.js
import React from 'react';
import './test.css';
export default () => <div className="test">Hello World!</div>;
/*pages/test.css*/
.test{background-color: red;}
Have a box with red background
Seeing this error:
ERROR in ./pages/test.css
Module build failed: ValidationError: Style Loader Invalid Options
options['importLoaders'] should NOT have additional properties
@ ./pages/test.js 10:0-20
@ multi ./pages/test.js
I don't have .babelrc and postcss.config.js in my local and trying to import css
| Tech | Version |
|---------|---------|
| next | 5 |
| node |9.5 |
| OS | macOS 10.12.6 |
| browser |chrome Version 64.0.3282.140 |

The same problem that using next-sass plugin.
ERROR in ./src/styled-components/index.scss
Module build failed: ValidationError: Style Loader Invalid Options
options['importLoaders'] should NOT have additional properties
Already made a pr on next-plugins to solve this 🙏🏻
@timneutkens thanks ❤️ . Was it merged? how can i use it?
@haikyuu Will do a new release soon with a lot of improvements to next-css / less / sass
Any updates on this? I still get the same error.
Same here
+1
+1 - it's still a problem
const withCSS = require('@zeit/next-css');
module.exports = withCSS();
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ValidationError: CSS Loader Invalid Options
options should NOT have additional properties
I met same problem.
% yarn build
$ next build
[1:02:12] Compiling server
[1:02:12] Compiling client
[1:02:14] Compiled server in 2s
[1:02:17] Compiled client in 5s
> Failed to build
{ Error: (client) ./components/font.scss
Module build failed (from ./node_modules/@zeit/next-css/node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ValidationError: CSS Loader Invalid Options
options should NOT have additional properties
yarn remove style-loader css-loader sass-loader
+1
next v7.0.2@zeit/next-css v1.0.1next-compose-plugins v2.1.1[update] remove css-loader can solve this problem.

yarn add @zeit/next-css@next
我遇到了同样的问题。
% yarn build $ next build [1:02:12] Compiling server [1:02:12] Compiling client [1:02:14] Compiled server in 2s [1:02:17] Compiled client in 5s > Failed to build { Error: (client) ./components/font.scss Module build failed (from ./node_modules/@zeit/next-css/node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js): ValidationError: CSS Loader Invalid Options options should NOT have additional properties它用以下命令解决了
yarn remove style-loader css-loader sass-loader
thx,resolve my problem
Most helpful comment
Already made a pr on next-plugins to solve this 🙏🏻