From 7557ac9dad21f09318b1c734738f56915d28d1af Mon Sep 17 00:00:00 2001 From: Pocholo Pantoja Date: Wed, 6 May 2020 11:09:24 +0800 Subject: [PATCH] fix: compile error when updating less-loader to v6 (#2194) --- package.json | 2 +- webpack.config.js | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5b4373355..0f9c90737 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "json-templater": "^1.2.0", "jsonp": "^0.2.1", "less": "^3.9.0", - "less-loader": "^5.0.0", + "less-loader": "^6.0.0", "less-plugin-npm-import": "^2.1.0", "lint-staged": "^10.0.0", "marked": "0.3.18", diff --git a/webpack.config.js b/webpack.config.js index 58594fc6d..e65efd898 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -59,7 +59,15 @@ module.exports = { loader: 'css-loader', options: { sourceMap: true }, }, - { loader: 'less-loader', options: { sourceMap: true, javascriptEnabled: true } }, + { + loader: 'less-loader', + options: { + lessOptions: { + sourceMap: true, + javascriptEnabled: true, + }, + }, + }, ], }, {