Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] iconify-icon support #139

Open
Endermanch opened this issue Jan 27, 2024 · 2 comments
Open

[Feature Request] iconify-icon support #139

Endermanch opened this issue Jan 27, 2024 · 2 comments

Comments

@Endermanch
Copy link

Since Nuxt is an SSR-oriented framework, I would like to propose a shift from @iconify/vue to iconify-icon, as that would make rendering heaps more consistent and lighter, reaping the benefits of using a Shadow DOM.

Reads:
vuetifyjs/vuetify#7821 (comment)
https://iconify.design/docs/iconify-icon/

@cyberalien
Copy link

Yes, this is a very good idea.

I'm actually using iconify-icon with Nuxt on new Iconify icon sets website, it is way better for SSR than @iconify/vue. Works flawlessly.

One minor change is it requires adding this line to Nuxt config (it works fine without it, but shows warnings in console in dev mode):

	vue: {
		compilerOptions: {
			isCustomElement: (tag) => tag === 'iconify-icon',
		},
	},

Additionally, version 2 of web component has major performance increase. It uses IntersectionObserver to check if icon is visible, does not render icons that aren't visible to visitor.

Old Iconify components, such as @iconify/vue (and especially @iconify/react) has been a big pain to maintain because of SSR. In future I'm planning to deprecate them, asking users to switch to web component.

@danwithabox
Copy link

This would be very much appreciated from the point of view of a new Nuxt adopter 🎉

As I'm evaluating the framework, coming across such situations where the "best" solution differs from the "official" solution causes some friction and unease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants