webpack build 在windows和Linux下build需注意路径的大小写

版权声明:工作和生活的点点滴滴都应该记录下来! https://blog.csdn.net/u011350541/article/details/84034952

如:route/index.js
实际路径:/page/WanHG/index.vue

在index.js中写法

const ImageList = () => import('/page/Admin/imgaeList.vue')
const WanHgIndex = () => import('/page/WanhG/index.vue'

在Windows内进行build不会报错,因为Windows忽略路径的大小写。但是Linux下会报错,提示无法找到文件。

因此在配置路由时,一定要保证index.js中与路径写法一模一样

猜你喜欢

转载自blog.csdn.net/u011350541/article/details/84034952