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

Add warning when used remote icon #275

Open
iBobik opened this issue Oct 9, 2024 · 1 comment
Open

Add warning when used remote icon #275

iBobik opened this issue Oct 9, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@iBobik
Copy link

iBobik commented Oct 9, 2024

I sometimes forgot to install local collection when used new icon. It works nobody will notice it.

Could you add optional warning when remote icon was loaded, so I can see it in the dev server console and in CI while building?

Option:

export default defineNuxtConfig({
  icon: {
    remoteWarning: true
  }

How this warning could look like:

ℹ Nuxt Icon server bundle mode is set to local  
✔ Nuxt Icon discovered local-installed 5 collections: fontisto, heroicons, material-symbols, ph, simple-icons
 WARN  [Nuxt Icon warn]: Loaded remote icon i-ion-example
@antfu
Copy link
Member

antfu commented Oct 28, 2024

Maybe you can try

export default defineNuxtConfig({
  // development time only override
  $development: {
    icon: {
      serverBundle: 'local',
      fallbackToApi: false
    }
  },
  icon: {
    // ... your production settings
  }
})

to enforce you to not using remote on dev time?

@antfu antfu added the documentation Improvements or additions to documentation label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants