Minor Changes
-
#13578
406501a
Thanks @stramel! - The SVG import feature introduced behind a flag in v5.0.0 is no longer experimental and is available for general use.This feature allows you to import SVG files directly into your Astro project as components and inline them into your HTML.
To use this feature, import an SVG file in your Astro project, passing any common SVG attributes to the imported component.
--- import Logo from './path/to/svg/file.svg'; --- <Logo <Logo width={64} height={64} fill="currentColor" />
If you have been waiting for stabilization before using the SVG Components feature, you can now do so.
If you were previously using this feature, please remove the experimental flag from your Astro config:
import { defineConfig } from 'astro' export default defineConfig({ - experimental: { - svg: true, - } })
Additionally, a few features that were available during the experimental stage were removed in a previous release. Please see the v5.6.0 changelog for details if you have not yet already updated your project code for the experimental feature accordingly.
Please see the SVG Components guide in docs for more about this feature.