Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(projects): fix app version notification plugin with sub deploy path #668

Closed
wants to merge 1 commit into from

Conversation

Xy-Zipper
Copy link

修复当VITE_BASE_URL=/anypath为任意二级目录时,请求地址不一致的bug

@honghuangdc
Copy link
Member

17d7e52
项目的基础路径始终都应该是以“/”结尾的

代码可以优化成

const baseUrl = import.meta.env.VITE_BASE_URL || '/';
const res = await fetch(`${baseUrl}index.html?time=${Date.now()}`);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants