Closed jakeanq closed 8 months ago
I've released a beta with Svelte 5 support (hopefully). Test it and check if it works.
npm i -D @poppanator/sveltekit-svg@svelte5
This seems to be working almost perfectly, thanks!
The only minor issue is that I still get this warning:
Sourcemap for ".../svelte-site/src/resources/title.svg" points to missing source files
Also I encountered #54 and temporarily worked around it by adding @rollup/pluginutils
as a dev dependency as a comment on that ticket suggests.
I think this should now be fixed in 5.0.0-svelte5.2
That works for me!
@poppa thanks so much for the update to Svelte5!
Trying to install it with the rc version svelte@"^5.0.0-next.123"
seems to be failing with this error,
npm i -D @poppanator/sveltekit-svg@svelte5
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: website@0.0.1
npm ERR! Found: svelte@5.0.0-next.123
npm ERR! node_modules/svelte
npm ERR! dev svelte@"^5.0.0-next.123" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer svelte@">=5.x" from @poppanator/sveltekit-svg@5.0.0-svelte5.2
npm ERR! node_modules/@poppanator/sveltekit-svg
npm ERR! dev @poppanator/sveltekit-svg@"5.0.0-svelte5.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
Trying to install it with the rc version
svelte@"^5.0.0-next.123"
seems to be failing with this error,npm i -D @poppanator/sveltekit-svg@svelte5
[...]
Thanks for the report @pyrossh . This should now be fixed in v5.0.0-svelte5.3. If you still get the error, please re-open #57
@poppa Thanks it works now.
I'm still seeing
Failed reading SVG "....bmc.svg": Invalid compiler option: css: "none" is no longer a valid option.
with
"svelte": "5.0.0-next.242",
"@poppanator/sveltekit-svg": "^4.2.1",
is there a way to pass a css fill to the SVG to prevent the warning?
also i'm wondering if the config options in the readme here are not ready for 5.0 of sveltekit?
I'm wondering where the plugins
would go then? I
const config = {
preprocess: vitePreprocess(),
kit: { ... },
// put here for now but not sure? at least no error on startup
plugins: [
svg(), // Options are optional
],
I'm still seeing ...
"svelte": "5.0.0-next.242", "@poppanator/sveltekit-svg": "^4.2.1",
You need to install the version 5 package of this plugin, e.g. the svelte5
tag: npm i -D @poppanator/sveltekit-svg@svelte5
@dcsan
I realise this is probably still rather early to be looking at this, but I am so I figure I'll put a ticket with my findings. I have patched it locally so there's no urgency on my part to get it fixed ;)
When using
sveltekit-svg
with Svelte5.0.0-next.26
, compilation fails with the following error:Changing
css: 'none',
tocss: 'external',
fixes the compile issue and generally seems to work (the SVG is rendered now), although it now has a couple of warnings:(the last one is for the specific SVG I am importing, but applies more generally)