You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before `v1.10`, due to the limitation of Iconify's previous convention, all custom icons were normalized to `kebab-case` with a warning. Thanks to the updates on Iconify side, starting from `v1.10`, you can opt-in to use case-sensitive custom collections and by pass the normalization.
193
+
194
+
```ts
195
+
exportdefaultdefineNuxtConfig({
196
+
modules: [
197
+
'@nuxt/icon'
198
+
],
199
+
icon: {
200
+
customCollections: [
201
+
{
202
+
prefix: 'my-icon',
203
+
dir: './assets/my-icons',
204
+
normalizeIconName: false, // <-- this
205
+
},
206
+
],
207
+
},
208
+
})
209
+
```
210
+
211
+
Which enable to use `assets/my-icons/FooBar.svg` as `my-icon:FooBar`, for example.
212
+
213
+
`normalizeIconName` is default to `true` for backward compatibility, and will be flipped in the future major version. See [#265](https://github.com/nuxt/icon/issues/265) for more context.
214
+
190
215
### Icon Customization
191
216
192
217
To update the default size (`1em`) of the `<Icon />`, create an `app.config.ts` with the `icon.size` property.
logger.warn(`Custom icon \`${name}\` is normalized to \`${normalized}\`, we recommend to change the file name to match the icon name`)
65
+
if(normalized!==name)
66
+
logger.warn(`Custom icon \`${name}\` is normalized to \`${normalized}\`, we recommend to change the file name to match the icon name, or pass \`normalizeIconName: false\` to your custom collection options`)
0 commit comments