umi 项目部署nginx非根目录

银弹998 / 2023-08-08 / 原文

1.umi配置

image

只需要配置 publicPath:'./'

2. nginx配置

image

location 后路径不带/
alias 后路径要携带/