URL with import.meta.url
fails with template string and nonexistent asset
#11157
Labels
import.meta.url
fails with template string and nonexistent asset
#11157
Describe the bug
According to docs, vite supports dynamic URLs via template literals
Everything was working properly on vite v3.1, but since vite v3.2 there's an issue with this feature when trying to retrieve an inexistant asset URL using a template string.
Reproduction
https://github.com/Toilal/vite-url-dynamic-repro
Steps to reproduce
run
npm install
andnpm run dev
and see output of the 4 computed URLs.When using vite 3.2.4, the last computed url is not the expected one.
vite 3.2.4

Using vite 3.1.8, it is the expected output.

System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: