TYPO3 Icon API
The extension includes a custom Svg for the TYPO3 Icon API
which allows you to register SVG icon files generated by Vite. This works both in frontend
and backend context.
Note that this does not support the Vite dev server, but rather uses the files generated by the production build.
To register a new icon, add the following to the Configuration/ file:
Configuration/Icons.php
return [
'site-logo' => [
'provider' => \Praetorius\ViteAssetCollector\IconProvider\SvgIconProvider::class,
'source' => 'assets/Image/Icon/typo3.svg',
'manifest' => 'path/to/manifest.json', // optional, defaults to defaultManifest
],
];
Copied!
Then you can use the Icon ViewHelper <core:icon> to use the icon in your templates.