想在 github page 上部署自己的 Vue 项目,把打包后的 dist 目录上传到了 github 上,然后通过 github io 访问,结果出现了如下错误信息:
有的回答说是 history 路由模式的问题,我也配置成了 hash 模式:
const router = createRouter({
history: createWebHashHistory(process.env.BASE_URL),
routes
})
export default router
请问怎么解决。。。 THX
publicPath
或者base
改成./
试试