【填坑】vue+webpack 升级后在原有项目上的适配问题

古人云:不作死就不会死

本人的项目是 vue + webpack,vue单文件中使用了 Jade 模板与 less 预编译器

起因是因为谈论到 Jade 模板问题,Jade 早已改名为 Pug,并且发布了2.0版本,想着不如升级了吧,顺便把 webpack 与 vue 也一并升级了,事实证明,升级需谨慎 = =

首先之前的版本如下:

"vue": "2.4.2"
"webpack": "2.7.0"复制代码

升级后的版本为:

"vue": "2.5.7"
"webpack": "3.8.1"复制代码

运行 npm update ,一切正常,然而运行 vue 项目就开始报错了

// webpack 报错
(node:45948) 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.

// vue报错
// 略过一些重复的报错
warning  in ./src/pages/List.vue

(Emitted value instead of an instance of Error) the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to