Yummygum / react-flagpack

Flagpack contains 250+ flag icons to easily use within your code project.
https://flagpack.xyz
MIT License
131 stars 26 forks source link

Install only specific flags from react-flagpack #77

Open ernstoarllano opened 1 month ago

ernstoarllano commented 1 month ago

Detailed Description

Currently, when using the react-flagpack library in a Next.js project, all SVGs are installed in the public folder by default. This request proposes a way to selectively install only the specific flags needed, rather than the entire collection.

Is your feature request related to a problem? Please describe.

The default installation of all SVGs can lead to unnecessary bloat in the project. It would be more efficient to install only the flags that are needed.

Describe the solution you'd like

A feature that allows users to specify which flags to include during the installation process, reducing the overall size of the package in the project.

Describe alternatives you've considered

Manually deleting unused SVGs from the public folder post-installation, but this is not an ideal solution.

Additional context

This feature would help minimize unnecessary bloat in the project, particularly for cases where only a limited number of flags are needed. By allowing selective installation, the overall efficiency of the development process can be improved, keeping the project lean and optimized.

zoeyfrisart commented 1 week ago

Hi there, First of all, apologies for the malicious content shared in the comment above. This comment slipped through, and we didn't notice that someone had replied. Please don't download the link in the comment.

We appreciate the suggestion, and it is something we are considering. However, this does require some reworking of the CLI. We plan to add this in the future, but unfortunately, we don't have the resources to do so now. If someone wants to create a pull request for this, give me a tag and I'll have a look at it.