How to configure babelrc of next.js and how to configure less!

.babel how to configure
how to configure less
adding next.config.js doesn"t work at all

const withLess = require("@zeit/next-less")

module.exports = withLess({
  webpack: (config, { buildId, dev, isServer, defaultLoaders }) => {
    // Perform customizations to webpack config
    
    // Important: return the modified config
    config.module.rules.push({
        test: /\.less$/,
        use: [{
            loader: "style-loader"
        }, {
            loader: "css-loader"
        }, {
            loader: "less-loader", options: {
                sourceMap: true
            }
        }]
    })
    console.log(config.module.rules, "--")
    return config
  },
  webpackDevMiddleware: config => {
    // Perform customizations to webpack dev middleware config
    // console.log(config, "@@")
    // Important: return the modified config
    return config
  }
})

.babelrc

{
  "presets": [
    []
  ],
  "ignore": []
}

I have just started to learn next

Mar.11,2021

try @ zeit/next-less

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8ecb-47cce.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8ecb-47cce.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?