Open mansoorkhan96 opened 1 month ago
Also tried following but still not working.
<script>
{!! Vite::content('@vite-plugin-svg-spritemap/client') !!};
</script>
I hope this gets fixed, but in the meantime here's a workaround:
VitePluginSvgSpritemap('resources/svg/*.svg', {
output: {
filename: 'spritemap.svg',
},
}),
href="{{ asset('build/assets/spritemap.svg') }}?{{ filemtime(public_path('build/assets/spritemap.svg')) }}#sprite-{{ $name }}"
Remove the hash and cache-bust via query string.
Seems like a bug with the new multiple instances feature. If you don't use any new features, you can downgrade on 2.2 version.
Seems like a bug with the new multiple instances feature. If you don't use any new features, you can downgrade on 2.2 version.
I will try to downgrade to 2.2 and report back. Thanks.
Downgraded to 2.2 and still same error.
I did a downgrade to version 2.2
.
HMR started working and icons with injectSVGOnDev: true
param were added before </body>
tag.
But there is still an issue:
/__spritemap
in the path part still prevents apply of icon
Example:
<svg><use xlink:href="/__spritemap#icon-arrow"></use></svg>
Tested on stack Laravel + InertiaJS + Vue.
I have tried in many different ways but the HMR would not work in Laravel.
error in console: net::ERR_ABORTED 404 (Not Found)
I have added following in vite.js
And in my blade layout where i add app.js.
Svg blade component
Screenshots
It seems to generate the HMR script url but does not inject the svg sprites.