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
I ran into an issue using @nuxt/ui which now uses @nuxt/icon under the hood (used to work when icon collection names could be specified as nuxt/ui module args even tho i had to add a ts-ignore as it wasn't referenced in the enum type), I am using a custom iconify collection i built which goes by
in my package.json which isn't referenced in https://github.com/nuxt/icon/blob/main/src/collection-names.ts
thus making it uncompatible with @nuxt/icon.
I think the issue comes from the usage of collectionNames there (as it seems we only values are only read if they are part of the underlying array):
Would it be possible further expand the compatibility to include custom collections? (and eventually check if these are installed print an error on the logger if it isn't the case)
NOTE: It seems to work when using this configuration (note SSR isn't set to false which is a constraint I have)
icon: {serverBundle: {collections: ['as']}}
but it the specific project is using this piece of config
[...]
ssr: false,// SSR forced to falseicon: {provider: 'server',// Tried with and without thisserverBundle: {collections: ['as']}}
Sorry if it is a bit long, I tried my best to keep it pleasant to read though. Thank you in advance! :)
The text was updated successfully, but these errors were encountered:
adjabaev
changed the title
Custom collections do not work
Custom collections aren't recognised
Sep 9, 2024
Yeah I think that are the ways to use it. When ssr: false and provider is not set to server, the client will go to Iconify's API endpoint to ask for icons, which they don't have your custom iconset. The only way seems to serve it from your own server
Hi, hope you're all doing well!
I ran into an issue using
@nuxt/ui
which now uses@nuxt/icon
under the hood (used to work when icon collection names could be specified as nuxt/ui module args even tho i had to add a ts-ignore as it wasn't referenced in the enum type), I am using a custom iconify collection i built which goes byin my package.json which isn't referenced in
https://github.com/nuxt/icon/blob/main/src/collection-names.ts
thus making it uncompatible with
@nuxt/icon
.I think the issue comes from the usage of
collectionNames
there (as it seems we only values are only read if they are part of the underlying array):icon/src/collections.ts
Lines 72 to 73 in cc14fe4
Would it be possible further expand the compatibility to include custom collections? (and eventually check if these are installed print an error on the logger if it isn't the case)
NOTE: It seems to work when using this configuration (note SSR isn't set to false which is a constraint I have)
but it the specific project is using this piece of config
Sorry if it is a bit long, I tried my best to keep it pleasant to read though. Thank you in advance! :)
The text was updated successfully, but these errors were encountered: