Closed zoeyfrisart closed 3 years ago
Hi! I'm willing to work on this issue. I had a quick look at the code and I think it should be doable in reasonable time. Please be aware that this will increase the size of your bundle, though.
Hey @fredericbonnet this would be fine as we believe this outweights the increase in bundle size.
As making a lot of network request to GitHub also slows down the performance by a lot.
Hi @fredericbonnet and @yannick1691,
It should be able to tree shake the flag that is used from out the component per framework. Say I'm using React with the NL flag. I only need the NL flag in my bundle. A bit low prio but should be thought about while developing. Thanks in Advance. I'm also curious about your solution!
As part of #Hacktoberfest we thought we reach out to the community and ask for help with a issue we have been trying to resolve for a while now.
Currently in the vue-flagpack, react-flagpack and angular-flagpack we load the images using the GitHub gist url. This instead should be a local image (for example compiled to a base64 image)
Detailed Description
In the flagpack packages, the src should be a base64 url instead of the GitHub url. As this is needed for all packages it would most likely be the smartest to do this transform in the core.
Relevant repos
react-flagpack vue-flagpack angular-flagpack
Is your feature request related to a problem? Please describe.
This has the following benefits:
Describe the solution you'd like
The files to be either imported from the core, or resolving the import to a base64 url.