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

[3.2.0-beta.3] new URL doesn't work with alias and dynamic path #10597

Open
7 tasks done
jacekkarczmarczyk opened this issue Oct 22, 2022 · 6 comments · May be fixed by #10743
Open
7 tasks done

[3.2.0-beta.3] new URL doesn't work with alias and dynamic path #10597

jacekkarczmarczyk opened this issue Oct 22, 2022 · 6 comments · May be fixed by #10743
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@jacekkarczmarczyk
Copy link

jacekkarczmarczyk commented Oct 22, 2022

Describe the bug

The code below doesn't return asset URL

new URL(`@/${img}.svg`, import.meta.url).href

Alias alone works, dynamic path works, but these 2 together don't:
image

Reproduction

https://stackblitz.com/edit/vitejs-vite-ecxnab?file=main.js&terminal=dev

Steps to reproduce

Open the repro, see the one image is not loaded while others are

System Info

stackblitz

Used Package Manager

npm

Logs

No response

Validations

@usercao
Copy link

usercao commented Apr 26, 2023

This issue still exists in version 4.3.2.

@BenHerbst
Copy link

Yup, also had this today and cant find a way to fix

@FarooqAlaulddin
Copy link

issue persists.

@AndresGarciadelaHuerta
Copy link

Any updates on this issue? I've been stuck with this problem while trying to migrate from webpacker to vite 😕

@kevingjs
Copy link

Any update on this? Issue still persist.

@Heniker
Copy link

Heniker commented Dec 7, 2024

Kind of relevant: #14500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants