When utilizing an import with query params such as ?width=1em&height=1em along side a compiler like 'svelte'. The result is a broken import path.
For example using the vite-svelte example,
// src/App.svelte
-import RawMdiAlarmOff from 'virtual:icons/mdi/alarm-off?raw&width=4em&height=4em'
+import RawMdiAlarmOff from 'virtual:icons/mdi/alarm-off?width=4em&height=4em'
Describe the bug
When utilizing an import with query params such as
?width=1em&height=1em
along side a compiler like'svelte'
. The result is a broken import path.For example using the
vite-svelte
example,removal of the
raw
query param causes the virtual import path to break. Below is the before and after the above changes:Before:
~icons/mdi/alarm-off?raw&width=4em&height=4em
After:~icons/mdi/alarm-off?width=4em&height=4em.svelte
This prevents the app from building
Reproduction
./examples/vite-svelte
System Info
Used Package Manager
pnpm
Validations