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

Why the src of audio in index.html diffrent with video after build #18174

Closed
7 tasks done
taosapp opened this issue Sep 23, 2024 · 2 comments
Closed
7 tasks done

Why the src of audio in index.html diffrent with video after build #18174

taosapp opened this issue Sep 23, 2024 · 2 comments

Comments

@taosapp
Copy link

taosapp commented Sep 23, 2024

Describe the bug

vite.config.js set base: "./", run build, index.html => dist/index.html,
<audio src="/img/bgm.mp3" /></audio> still keep absolute path /img/, but <video src="/img/v1.mp4" /></video> would be relative path ./img/v1.mp4

Reproduction

https://stackblitz.com/edit/vitejs-vite-7m53y5?file=dist%2Findex.html

Steps to reproduce

Run npm run build

System Info

windows 11, chrome 129.0.6668.59 (Official Build) (64-bit)

Used Package Manager

npm

Logs

No response

Validations

Copy link

stackblitz bot commented Sep 23, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@bluwy
Copy link
Member

bluwy commented Sep 23, 2024

I think this is a duplicate of #5098. Vite hasn't added support yet for the audio tag.

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants