nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.
https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue
MIT License
868 stars 37 forks source link

v0.6.6 has problems with uppercase alias names #125

Closed toniengelhardt closed 6 months ago

toniengelhardt commented 7 months ago

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.

Atinux commented 7 months ago

Might be related to https://github.com/nuxt/nuxt/pull/24318

Could you confirm with the latest Nuxt version?

toniengelhardt commented 7 months ago

@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?

Atinux commented 7 months ago

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?

toniengelhardt commented 6 months ago

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 🙏🏽

toniengelhardt commented 6 months ago

@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.