当前位置:   article > 正文

vue-router中的history模式,域名二级路由,子目录nginx中的配置_vue history配置子目录

vue history配置子目录

可以修改三个配置

1.路由

const route = new Router({

mode : 'history',

base: '/admin/',

routes:[]

})

2.打包文件 config/index.js

build设置

assetsPublicPath: '/admin/',

3.nginx配置

try_files $uri $uri/ /admin/index.html;

4.项目目录配置实例

项目路径 web/admin/index.html

 

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号