Next-plugins: How do you enable inline javascript in next-less

Created on 18 Apr 2018  路  3Comments  路  Source: vercel/next-plugins

While compiling the less files, i come across this error

Inline JavaScript is not enabled. Is it set in your options?

How do i pass in options to the less compiler in next-less?

Most helpful comment

module.exports = withLess({
    lessLoaderOptions: {
        javascriptEnabled: true,
    },
})

All 3 comments

How were you able to resolve this?

module.exports = withLess({
    lessLoaderOptions: {
        javascriptEnabled: true,
    },
})

@simonyouth

error - ./node_modules/antd/es/style/index.less
ValidationError: Invalid options object. Less Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'javascriptEnabled'. These properties are valid:
   object { lessOptions?, prependData?, appendData?, sourceMap?, implementation? }

image

Was this page helpful?
0 / 5 - 0 ratings