cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
210 stars 51 forks source link

Sprite not rendering properly for sometimes in chrome #116

Closed Arsadh closed 4 years ago

Arsadh commented 4 years ago

@cascornelissen , Svg sprite are not rendered properly in chrome browser

cascornelissen commented 4 years ago

Do you have some more information? Which version of the plugin are you using, can you share your SVGs or set up a minimal reproducible test case for me?

Arsadh commented 4 years ago

@cascornelissen , here i attached one svg which I used in sprite and my chrome version is Google Chrome is up to date Version 84.0.4147.89 (Official Build) (64-bit) and laravel mix version I used is "laravel-mix": "^5.0.1".
Svg's are visible only after they are cached in browser

random.zip

cascornelissen commented 4 years ago

Thanks for providing the SVG, there doesn't seem to be a problem with that. I need more info:

The following comment, combined with the simple SVG you've provided makes me pretty sure this is not an issue with the plugin.

Svg's are visible only after they are cached in browser

This sounds like the spritemap gets cached by the browser, does the file have a hash in the filename (e.g. spritemap.ba231h4.svg) or is it just spritemap.svg? In case of the latter please use the output.filename and set it to a value like spritemap.[contenthash].svg.

Arsadh commented 4 years ago

@cascornelissen , Thanks for your concern, this issue occurs because of the latest Chrome update.

Reference issue - https://bugs.chromium.org/p/chromium/issues/detail?id=1107442

cascornelissen commented 4 years ago

@Arsadh, thanks for diving deeper into this, that's a really interesting bug... The fix with the content hash won't solve the issue either in that case and I think the only way to fix this is with the Chrome team. Would you mind if we close this issue?

Arsadh commented 4 years ago

No, I don't mind @cascornelissen