Releases: poppa/sveltekit-svg
v4.2.1 - Fixed missing dependency
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
v2.1.2 - Keep the generated source map
-
Keep the generated source map
This removes the "Sourcemap is likely to be incorrect: a plugi
(sveltekit-svg) was used to transform files..." warning seen when using this
plugin outside of SvelteKit