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

fix(CountryFlag): include flag icons in repo instead of via dependency #4324

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

tujoworker
Copy link
Member

@tujoworker tujoworker commented Nov 22, 2024

There are a couple of projects which has had issues with the flag-icons package.
Where their bundler did change the path from 'flag-icons/flags/1x1/xx.svg' to './flag-icons/flags/1x1/xx.svg'
so it did add a './' in front of the path, which is not a valid path.
Therefore we include these SVGs in our assets folder, and point to them with a valid path.

Copy link

vercel bot commented Nov 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 10:47am

@langz langz mentioned this pull request Nov 22, 2024
Copy link

codesandbox-ci bot commented Nov 22, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@tujoworker tujoworker requested a review from langz November 22, 2024 09:50
@langz langz changed the title fix(CountryFlag): include flag icons in repo instad via dependency fix(CountryFlag): include flag icons in repo instead of via dependency Nov 22, 2024
Copy link
Contributor

@langz langz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🇳🇴
Is it just straight-forward to copy all the flags from the dependency/package flag-icons? Or do we have to consider some kind of license?

Now we'll have to maintain the flags ourselves though, but I'm not sure how often flags change 🤔
Maybe we'll just have to listen/subscribe for changes in flag-icons package, then change in our codebase if we find any changes there? 🤔

@tujoworker
Copy link
Member Author

Is it just straight-forward to copy all the flags from the dependency/package flag-icons? Or do we have to consider some kind of license?

Yes – but true, we should add a license file where the SVG's are placed.

Maybe we'll just have to listen/subscribe for changes in flag-icons package, then change in our codebase if we find any changes there?

Yes.

@tujoworker tujoworker merged commit 69dc60a into main Nov 22, 2024
10 checks passed
@tujoworker tujoworker deleted the fix/flags-icon-module branch November 22, 2024 12:52
tujoworker added a commit that referenced this pull request Nov 22, 2024
Motivation for the bugfix release is mainly this fix
#4324
tujoworker pushed a commit that referenced this pull request Nov 22, 2024
## [10.57.1](v10.57.0...v10.57.1) (2024-11-22)

### 🔁 CI

* only run GitHub Actions on git commits ([#4327](#4327)) ([8a07477](8a07477))

### 🐛 Bug Fixes

* **CountryFlag:** include flag icons in repo instead of via dependency ([#4324](#4324)) ([69dc60a](69dc60a)), closes [#4307](#4307)
* **Forms:** ensure Form.Card supports spacing props ([#4328](#4328)) ([f981b42](f981b42))
@tujoworker
Copy link
Member Author

🎉 This PR is included in version 10.57.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Module not found: Can't resolve './flag-icons/flags/1x1/xx.svg'
2 participants