build: 将基础路径从项目名称改为相对路径

修改vite配置中的base路径,从`/${name}/`改为`./`,以支持静态文件的相对路径访问
This commit is contained in:
hanshiyang 2025-11-19 16:57:47 +08:00
parent 989ae39cd7
commit 2bafad6a78

View File

@ -38,7 +38,7 @@ export default defineConfig(({ mode }) => {
} }
} }
return { return {
base: `/${name}/`, base: './',
publicDir: false, publicDir: false,
build: { build: {
rollupOptions: { rollupOptions: {