vitejs / vite-plugin-vue2

Vite plugin for Vue 2.7
MIT License
543 stars 46 forks source link

After upgrading from latest Vite 4 to version 5.0.0 I've got an extra space in `<source srcSet="value "` in SSR mode #99

Closed murad-khafizov closed 7 months ago

murad-khafizov commented 7 months ago

After the upgrade now I see this extra space at the end of the srcSet value, which causes a mismatch between the server-side and client-side and leads to the following warning: Warning: Prop "srcSet" did not match. Here is how it looks like in the HTML code:

<picture>
    <source srcSet="https://somedomains/somename.avif " type="image/avif" />
    <img alt="apartment" src="https://somedomains/somename.jpg" />
</picture>

Pay attention to the space after somename.avif It happens only in the Dev-Mode of Vite. When I build it for production it's all good.

Also, I tried to downgrade Vite to 4.5.2, version by version and the issue takes place starting from version 5.0.0