Next-plugins: How to config next.js with css + less + scss

Created on 29 Apr 2020  路  1Comment  路  Source: vercel/next-plugins

const withLess = require('@zeit/next-less') const withSass = require('@zeit/next-sass') module.exports = withLess(withSass({ // options }))

seems ugly and friendly to developers~~~

Most helpful comment

I use next-compose-plugins then wrap them into it.

const withPlugins = require("next-compose-plugins");
const withCSS = require("@zeit/next-css");
const withLess = require("@zeit/next-less");
const withSass = require("@zeit/next-sass");

const config = {
  // all your options here
};

module.exports = withPlugins([withCSS, withSass, withLess], config);

>All comments

I use next-compose-plugins then wrap them into it.

const withPlugins = require("next-compose-plugins");
const withCSS = require("@zeit/next-css");
const withLess = require("@zeit/next-less");
const withSass = require("@zeit/next-sass");

const config = {
  // all your options here
};

module.exports = withPlugins([withCSS, withSass, withLess], config);
Was this page helpful?
0 / 5 - 0 ratings