vuecli/3.0配置别名并实现路由懒加载

1:在babel.config,.js中,(首先要安装依赖

npm install --save-dev @babel/plugin-syntax-dynamic-import

()

2:vue.config.js   

function resolve (dir){
  return path.join(__dirname,dir)
}

3:在router.js中

原文地址:https://www.cnblogs.com/binglove/p/11038232.html