new URL(url, import.meta.url)
does not work when query parameters are present
#13017
Closed
7 tasks done
Labels
p3-downstream-blocker
Blocking the downstream ecosystem to work properly (priority)
Describe the bug
The following does not work because of the query parameter:
If you remove
?abc
then it works again.Here are the docs for this feature: https://vitejs.dev/guide/assets.html#new-url-url-import-meta-url
And the code for the feature: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/assetImportMetaUrl.ts
Query parameters are needed to support
vite-imagetools
#11157 is potentially related, but it's unclear if it's the same issue
Reproduction
https://github.com/benmccann/import.meta.url-with-query-params
Steps to reproduce
Run
npm install
followed bynpm run dev
System Info
npmPackages: vite: ^4.3.2 => 4.3.3
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: