Afsanefda
Afsanefda

Reputation: 3339

Next.js Is there a way to have built in css-sass enabled while adding less configuration?

I want to use the css/sass built-in feature in Next.js while I want to add less configuration.

The css/sass built-in is fine but as soon as I add less to next.config.js, it disables the feature so I have to configure them like before one bye one using:

@zeit/next-sass
@zeit/next-less
@zeit/next-css

Is there a way to keep the feature enable while adding just less config?

Warning: Built-in CSS support is being disabled due to custom CSS configuration being detected. after adding less configuration!

Upvotes: 1

Views: 1034

Answers (1)

Nikolai Kiselev
Nikolai Kiselev

Reputation: 6603

Next.js disables all built-in CSS support if you have any custom CSS preprocessor.

So, if you add a custom plugin to process Less and need support for CSS and Sass, you would have to setup those plugins as well.

Next.js webpack config source code

Upvotes: 1

Related Questions