-
Notifications
You must be signed in to change notification settings - Fork 544
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
the icon
component that integrated in nuxt-ui
by default is not shown at first loading
#2195
Comments
Hi @gaomingzhao666 👋 Take a look at: #2124 (comment) |
Thank you so much!! That's what I want |
Thank you so much for your help, but the issue is still here in my case so I decided to reopen this issue. I tried to add Also, I tried to install nuxt-icon@latest module independently from nuxt-ui, but the problem is still here. |
icon
component that integrated in nuxt-ui
by default is not cachedicon
component that integrated in nuxt-ui
by default is not shown at first loading
Hi! I can confirm this behavior but starting from nuxt 3.13.0 I have also recently upgraded to nuxt 3.13.2 and icons have broken a bit more:
I've tried @nuxt/[email protected] - @nuxt/[email protected] - same result. However downgrading to nuxt 3.12.4 fixes the issue. Icons work ok when you have a simple page with no additional modules or stores. But when you add stores (pinia), persistency, onMounted hooks - it seems like something messing with the icons. Everything else works great. |
little update to the previous post. Finally managed to make it work (both ssr and ssg) with:
export default defineNuxtConfig({
modules: [
'@nuxt/ui'
],
icon: {
clientBundle: {
// scan all components in the project and include icons
scan: true,
// guard for uncompressed bundle size, will fail the build if exceeds
sizeLimitKb: 256,
},
},
}) @gaomingzhao666, I think you should include Howewer one question still bothers me. Same nuxt/ui, same tailwind. Also I've noticed that if With the minimal amount of site payload (one page - 2-3 icons) - 3.13.2 works fine without the above changes. When full project is in place - icons without the above changes stop working. I'm talking about Can someone elaborate? |
@gAlleb, Thank you so much for your help with the detailed and patient interpretation.😊 I added the code that you mentioned, the problem is solved. |
I would sad to say that the problem is still here but barely better, there are still a couple of icons can not load when I leave for a long time and then access the website again, but at least most of icons can load.😂 I guess it is just too many icons on this page. |
maybe
Also with
|
@gAlleb Thanks again for your help. The official documentation said that it would find icons and automatically import from Thank you so much for your detailed explanation and continual help!! |
Environment
Nuxt project info: 12:26:48 PM
Version
v2.18.4
Reproduction
the online address: https://nano-portfolio-ruby.vercel.app/
the repo: https://github.com/gaomingzhao666/nano-portfolio
Description
Hey, I don't install
nuxt-icon
module and I can use icons directly innuxt-ui
, because I think thenuxt-ui
already integratednuxt-icon
module.The problem is: that the icon is empty when users first enter the page that shows icons, and when I turn off the computer and open it in next day, the bug is reproduced.
I think the server cache is not working properly, should I install
nuxt-icon
module manually or it's just a bug tonuxt-ui
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: