You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am migrating to both Vite and Vitest (at the same time) and my UI has components that import .webp files. The UI and Vitest are sharing the same config and the UI is working fine, but any tests that indirectly imports a .webp is failing:
TypeError: Unknown file extension ".webp" for C:\Users\kgetz\Work\event-viewer\lib\geiger-vendor\dist\images\arista\5310-F.webp
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: {
"code": "ERR_UNKNOWN_FILE_EXTENSION",
}
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed (1)
Reproduction
Import a .webp file in a component, then include that component in a Vite UI and a Vitest unit test.
@sheremet-va I noticed you started working on a possible fix. Is there any kind of workaround I can employ locally for now? This problem is affecting almost a hundred of my unit test suites and I'd like to make some progress.
@sheremet-va I noticed you started working on a possible fix. Is there any kind of workaround I can employ locally for now? This problem is affecting almost a hundred of my unit test suites and I'd like to make some progress.
You can add your dist directory to test.deps.inline:
Describe the bug
I am migrating to both Vite and Vitest (at the same time) and my UI has components that import
.webp
files. The UI and Vitest are sharing the same config and the UI is working fine, but any tests that indirectly imports a.webp
is failing:Reproduction
Import a
.webp
file in a component, then include that component in a Vite UI and a Vitest unit test.System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: