nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.

Home Page:https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v0.6.6 has problems with uppercase alias names

toniengelhardt opened this issue · comments

In v0.6.5 this works:

nuxtIcon: {
  aliases: {
    'aws': 'IconAWS',
    // ...
  }
}

if there is a component in global named IconAWS.vue, but in v0.6.6 it breaks. The reason is the uppercase naming, if I rename the component and the alias to IconAws.vue it works.

Might be related to nuxt/nuxt#24318

Could you confirm with the latest Nuxt version?

@atinux not sure what's going on, just tested with nuxt@3.8.0...3.8.2 and nuxt-icon@0.6.1...0.6.6 and it's broken with all of those. But I'm pretty sure it worked and I just realized that it is broken a few days ago. And there is no reason why uppercase names should not work right?

Damn, I suspect it comes from scule update that transform IconAWS to IconAws.

Could you check with latest Nuxt version and look at the devtools to see your components names?

Sorry for the delay @atinux, got taken down by the flu...

I'm not sure what exactly changed, but it seems to be working now.

Closing 🙏🏽

@atinux I found the problem. Turns out for some reason my git was set up to ignore case and the changes were not properly tracked on GitHub. That's why it worked locally and not in production.

Everything seems to work properly now.

If someone finds this, the solution was to update the git settings like

> git config core.ignorecase false

and then commit the file name changes properly.