vite vue vue-router

非根目录配置
1、vite配置文件中base:'/test' 绝对路径
2、createWebHistory:createWebHistory('/test') 绝对路径
3、nginx

location /test {
        try_files $uri $uri/ /test/index.html;
    }

多级路径出现报错,不正确的原因,是因为路径不对,要设置为绝对路径可以解决路径不对的问题

posted @ 2022-07-13 16:40  Running00  阅读(448)  评论(0编辑  收藏  举报