Skip to content

Conversation

bhavyasaggi
Copy link

Fixes storybookjs/storybook#32355 & storybookjs/storybook#32354

Problem

On Windows machine, an image imports includes backslashes in the imagePath query-param. Eg. virtual:next-image?imagePath=C:\\codebase\\images\\sprite.svg.

Solution

Transform the imagePath to use forwardSlash when generating resolveId

@brettpostin
Copy link

Thanks for the quick fix. Any estimated timescales for this being released as it's sort of a blocking issue right now?

Alternatively, any suggested workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: next-image mock in nextjs/vite produces invalid paths on windows builds
2 participants