mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
9c4eefcdbf
* Add prettier for examples directory * Fix files * Fix linting * Add prettier script in case it has to be ran again
23 lines
620 B
JavaScript
23 lines
620 B
JavaScript
/* eslint-disable */
|
|
const withLess = require('@zeit/next-less')
|
|
const lessToJS = require('less-vars-to-js')
|
|
const fs = require('fs')
|
|
const path = require('path')
|
|
|
|
// Where your antd-custom.less file lives
|
|
const themeVariables = lessToJS(
|
|
fs.readFileSync(path.resolve(__dirname, './assets/antd-custom.less'), 'utf8')
|
|
)
|
|
|
|
// fix: prevents error when .less files are required by node
|
|
if (typeof require !== 'undefined') {
|
|
require.extensions['.less'] = file => {}
|
|
}
|
|
|
|
module.exports = withLess({
|
|
lessLoaderOptions: {
|
|
javascriptEnabled: true,
|
|
modifyVars: themeVariables // make your antd custom effective
|
|
}
|
|
})
|