reactのnext.js、cssとlessのインストール
548 ワード
npm install @zeit/next-css --save
npm install --save @zeit/next-less less
next.config.js
const withCss = require('@zeit/next-css');
const withLess = require('@zeit/next-less');
// fix: prevents error when .css files are required by node
if (typeof require !== 'undefined') {
// eslint-disable-next-line
//console.log("require",require);
require.extensions['.css','.less'] = (file) => {}
}
module.exports = withLess(withCss());