Dynamic import
Before the build, Vueless automatically scans the project files and collects all the icons. If Vueless can’t recognize an icon, it may be skipped, meaning it will be lost after the build.
To avoid this behavior and ensure all icons are included in the build, follow the rules below or add the required icons to the safelist.
If you need to use icon names in JavaScript, declare them within a JavaScript object. If the key in the object contains the word icon
, it will be automatically recognized by Vueless and the icon will be included in the build.
Icons safelisting
If you don’t want to use the object approach, you can simply add the required icons into the safelist to ensure they are included in the build.
In this case, both outlined and solid/filled icons will be safelisted, ensuring that both versions are included in the build.
Last updated