Vue.js less 添加支持和遇到的問題

本文出自:

http://blog.csdn.net/wyk304443164

用的 vue-cli 腳手架

複製的

"less": "^2.7.1",
"less-loader": "^2.2.3",

這個安裝之後。彈出

DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.

這個錯誤,然後,我找了下github上面的

https://github.com/webpack/loader-utils/issues/56

並沒有找到什麼我想要的答案,因爲我是加了less導致的,隨後我又看了下別人引入less的博客,後來我修改爲

"less": "^2.7.2",
"less-loader": "^4.0.3",

刪掉node_modules 和 package-lock.json(沒有就不刪)重新npm install即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章