Support for Frameworks through Modules - #1456
Open
Ballpin wants to merge 2 commits into
Open
Conversation
This allows later versions of nodejs to import the svg files much easier. It get easier to use the svg files straight in the frameworks such as react or vue.
Ballpin
force-pushed
the
feature/framework-support
branch
2 times, most recently
from
July 8, 2026 15:55
efcc080 to
77bcd9c
Compare
Added instructions for vue and react
Ballpin
force-pushed
the
feature/framework-support
branch
from
July 8, 2026 15:57
77bcd9c to
7147ea6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds support for NodeJS sub-path imports. So it gets easier to find the svg files in the package.
I also added instructions on how to add the flags as EcmaScript Modules so it gets easier to use them in frameworks such as React or Vue. Some of us require them to be added with svg code for better SSR support and to load less on first render through features like Intersection Observer.
Type of Contribution
Check the relevant box:
Testing & Verification
I have only tested it on my local Astro project by adding the vite configs inside my project and export paths inside the package.json (flag-icons)
Screenshots (if applicable)