| 129 | const selectors = getAllSelectors() |
| 130 | |
| 131 | async function mountCSS(icon: IconifyIcon) { |
| 132 | if (selectors.has(selector.value)) |
| 133 | return |
| 134 | if (typeof document === 'undefined') |
| 135 | return |
| 136 | const style = document.createElement('style') |
| 137 | style.textContent = getCSS(icon) |
| 138 | if (import.meta.dev) { |
| 139 | style.dataset.nuxtIconDev = props.name |
| 140 | } |
| 141 | const firstStyle = document.head.querySelector('style, link[rel="stylesheet"]') |
| 142 | if (firstStyle) |
| 143 | document.head.insertBefore(style, firstStyle) |
| 144 | else |
| 145 | document.head.appendChild(style) |
| 146 | selectors.add(selector.value) |
| 147 | } |
| 148 | |
| 149 | watch( |
| 150 | () => props.name, |