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

[v1] local Capitalized icons are imported as lowercase on macOS #189

Open
cbasje opened this issue Jan 8, 2024 · 1 comment
Open

[v1] local Capitalized icons are imported as lowercase on macOS #189

cbasje opened this issue Jan 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@cbasje
Copy link

cbasje commented Jan 8, 2024

What version of astro-icon are you using?

v1.0.2

Astro Info

Astro                    v3.6.4
Node                     v21.0.0
System                   macOS (arm64)
Package Manager          bun
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I have a set of local SVG icons that have capitalized names. On my laptop running macOS, the icons were unexpectedly imported as lowercase names and I could use the lowercase names in the <Icon> component. However, when I built and deployed my website to my Fly.io machine (which I think runs Debian Linux), the icons were imported with the real capitalized names. I assume this is because macOS has a case-insensitive file system? The Stackblitz example also does not have this issue.

What's the expected result?

This is not a big problem at all but I just wanted to mention it. For now, I fixed it running the command in https://stackoverflow.com/questions/7787029/how-do-i-rename-all-files-to-lowercase.
I think it would be nice if the astro-icon package itself automatically imported all local icons with lowercase names to keep the format similar to iconify icons, etc. Or maybe it could at least warn people about this issue when on macOS.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-fjance?file=src%2Fpages%2Findex.astro

@natemoo-re natemoo-re added the enhancement New feature or request label Jan 8, 2024
@natemoo-re
Copy link
Owner

I agree, it would be helpful to normalize the case for any references.

Sometimes issues like this are caused by a mismatch between the case sensitivity of git and the case sensitivity of your filesystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants