在vue根目录下创建vue.config.js 文件

// product为工程名
module.exports = {
    publicPath: '/product/',
    outputDir: 'product'
}

修改router.js

// product为工程名
const router = new VueRouter({
  mode: 'history',
  base: '/product/',
  routes
})

修改Nginx配置

// product为工程名
location /product {
    index  index.html index.htm;
    try_files $uri $uri/ /product /;
}

转载至 http://www.gzui.net/archives/3234

 

相关文章:

  • 2021-12-26
  • 2022-12-23
  • 2021-09-23
  • 2021-06-29
  • 2021-10-15
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2021-05-14
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案