next-css with option cssModules:true exclude node_module css files

Viewed 414

I have one next.js project setup with following next.config.js as below

const withCSS = require('@zeit/next-css')
module.exports = withCSS({
  cssModules: true
})

It works fine when you use as below

Create a CSS file style.css

.example {
  font-size: 50px;
}

Create a page file pages/index.js

import css from "../style.css"

export default () => <div className={css.example}>Hello World!</div>

But when I use without css module it doesn't work when I use css class instead of css module.

At least I want to exclude node_modules css files.

0 Answers
Related