Next-plugins: [next-less] It cannot import both .css and .less?

Created on 26 Feb 2020  路  1Comment  路  Source: vercel/next-plugins

// next.config.js
const withLess = require('@zeit/next-less')

module.exports = withLess({})
// _app.jsx
import 'github-markdown-css/github-markdown.css'
// import 'highlight.js/styles/color-brewer.css'
import '../assets/main.less'
[ error ] ./node_modules/github-markdown-css/github-markdown.css 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

How should I configure it ?

Most helpful comment

Oh, I get it.

// next.config.js
const withCss = require('@zeit/next-css')
const withLess = require('@zeit/next-less')

module.exports = withLess(withCss())

>All comments

Oh, I get it.

// next.config.js
const withCss = require('@zeit/next-css')
const withLess = require('@zeit/next-less')

module.exports = withLess(withCss())
Was this page helpful?
0 / 5 - 0 ratings

Related issues

hanford picture hanford  路  27Comments

furedal picture furedal  路  30Comments

morgs32 picture morgs32  路  15Comments

mvoloskov picture mvoloskov  路  20Comments

paulrberg picture paulrberg  路  36Comments