#Icons Not Displaying in Nuxt Studio Deployment
3 messages · Page 1 of 1 (latest)
Based on the information provided in the knowledge sources, I can offer some insights and potential solutions to your issue with icons not displaying in Nuxt Studio deployment.
-
Icon Configuration:
The issue you're experiencing might be related to how icons are configured and bundled in your Nuxt project. According to the Nuxt UI documentation (https://ui.nuxt.com/getting-started/theming#icons), Nuxt UI uses@nuxt/iconwhich is based on Iconify. However, your specific issue mentionsi-skill-icons, which might be using a different system. -
Dynamic Icons and Tailwind:
As mentioned in a Stack Overflow post (https://stackoverflow.com/questions/77295827), there can be issues with dynamic icons when using Tailwind CSS. The post states: "It uses the egoist/tailwindcss-icons which based on Tailwind engine that bundles only the static icons declared in your code". This means that dynamically changing icons based on theme might not work as expected if not properly configured. -
Local Storage and Color Mode:
The Nuxt UI documentation (https://ui.nuxt.com/getting-started/theming#dark-mode) mentions that if you're stuck in a particular color mode, it might be due to local storage settings. In your deployment environment, try clearing thenuxt-color-modeentry from the browser's local storage to see if it resolves the issue. -
Icon Collections:
The Nuxt UI documentation (https://ui.nuxt.com/getting-started/theming#icons) recommends installing icon collections locally. You might want to ensure that thei-skill-iconscollection is properly installed and configured in your project.
- Vite Plugin Configuration:
If you're using a custom SVG plugin, make sure it's properly configured for the production build. The Nuxt documentation (https://nuxt.com/docs/api/kit/builder#examples-3) shows an example of how to add a Vite plugin for SVG icons, which might be relevant if you're using a custom setup fori-skill-icons.
Recommendations:
- Verify that the
i-skill-iconscollection is properly installed and configured for production builds. - Check if the icons are being properly bundled in the production build. You might need to adjust your Vite or Webpack configuration.
- Ensure that your color mode configuration is correctly set up for the production environment in Nuxt Studio.
- Consider using the
@nuxt/iconmodule directly, as it's designed to work seamlessly with Nuxt and supports a wide range of icons.