Releases: poppa/sveltekit-svg
v5.0.0 - Default support for Svelte 5
This plugin is now officially, and primarily, for Svelte 5
What's Changed
- Update decalaration files to use new Component type by @AngelRionCervi in #58
- SvelteComponent not needed as causing issues passing props by @sansjack in #60
New Contributors
- @AngelRionCervi made their first contribution in #58
- @sansjack made their first contribution in #60
Full Changelog: v4.2.1...v5.0.0
v4.2.1 - Fixed missing dependency
@rollup/pluginutils
needs to be a dependency. This should fix #54
v4.2.0 - Optimize SVGs imported as URLs
SVGs imported as URLs (import svgUrl from ./some.svg?url
) will now be SVGO optimized before written to disk on production builds.
NOTE: SVGs imported as URLs will not be optimized in dev
mode.
This should fix #52
v4.1.2 - Return the full JS result from compile
This will include the map
property as well.
This should fix #48.
v4.1.1 - Set Svelte compiler css option to 'none'
The css
option to Svelte compile()
has changed and setting it to a boolean
value has been deprecated.
This gave the compilerOptions.css as a boolean is deprecated. Use 'external' instead of false. warning.
Since we're disregarding the css
field in the generated result, we can set this option to none
and skip all CSS stuff altogether.
v4.1.0 - Added the `preCompileHook` option
This is a function that lets the consumer transform the SVG into a Svelte component before being passed to the Svelte compiler.
v4.0.1 - Render the contents of the `<svg>` tag using `{@html}` in the component mode
This is to prevent Svelte having to parse the entire SVG.
Thanks @aradalvand for the code.
This solves #39
v4.0.0 - Support Svelte 4
This release supports Svelte 4
v3.0.1 - Maintenance release
This is a maintenance release with no code changes
- Updated all NPM packages
- Renamed
app.d.ts
tosvg.d.ts
since Svelte doesn't like these typings in
app.d.ts
(see issue 25) - Also copy
svg.d.ts
todist/
on build. - Some fixes to the README file
- Thanks to @joakimnordling for PR #35
v3.0.0 - Honor the SVGO `datauri` option
Support for the SVGO datauri option in the dataurl
query parameter. This means that ?dataurl=base64
, ?dataurl=enc
and ?dataurl=unenc
works.
This solves #32