今天将模板项目 npm install 一直报 Cannot read property ‘range’ of null 也是很无奈
多方排查 babel-eslint 高版本 代码检测问题
解决方式
- 降低babel-eslint 的版本
这个东西就不细说了 ,我就喜欢用最新的版本, 于是乎继续排查问题 - 问题所在
component: () => import(`@/views/modules/${URL}`)
这个东西有没有很熟悉 动态路由页面引入方式的一种
说这个写法违反了返回值null 的限制 苍天~~~~
不能这么引入我换一种
component: resolve => require([`@/views/modules/${URL}`], resolve)
于是乎就这么可以了, 中间过程曲折的不行, 搞得我还将vue-cli3升级成了vue-cli4