I was looking at what gets published to NPM, and seems that their build script takes input from src and output to optimize, then copying the result to top-level directories and releasing that.
https://github.com/tailwindlabs/heroicons/blob/eee05eb77af6cdedfb97f128d1998773fc984b28/package.json#L17-L19
In my project I changed the mount point to use the optimized version of the icons:
[[module.imports]]
path="github.com/tailwindlabs/heroicons"
[[module.imports.mounts]]
source = "optimized"
target = "assets/svg/heroicons"
Among other benefits, this allows for easier control of icon size using CSS. Example:
{{ $icon := resources.Get "svg/heroicons/20/solid/phone.svg" }}
<span class="w-8 h-auto">{{ $icon.Content | safeHTML }}</span>
I was looking at what gets published to NPM, and seems that their build script takes input from
srcand output tooptimize, then copying the result to top-level directories and releasing that.https://github.com/tailwindlabs/heroicons/blob/eee05eb77af6cdedfb97f128d1998773fc984b28/package.json#L17-L19
In my project I changed the mount point to use the optimized version of the icons:
Among other benefits, this allows for easier control of icon size using CSS. Example:
{{ $icon := resources.Get "svg/heroicons/20/solid/phone.svg" }} <span class="w-8 h-auto">{{ $icon.Content | safeHTML }}</span>