Skip to content

Support for Frameworks through Modules - #1456

Open
Ballpin wants to merge 2 commits into
lipis:mainfrom
Ballpin:feature/framework-support
Open

Support for Frameworks through Modules#1456
Ballpin wants to merge 2 commits into
lipis:mainfrom
Ballpin:feature/framework-support

Conversation

@Ballpin

@Ballpin Ballpin commented Jul 8, 2026

Copy link
Copy Markdown

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:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactor

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)

CleanShot 2026-07-08 at 17 49 50@2x

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
Ballpin force-pushed the feature/framework-support branch 2 times, most recently from efcc080 to 77bcd9c Compare July 8, 2026 15:55
@Ballpin
Ballpin force-pushed the feature/framework-support branch from 77bcd9c to 7147ea6 Compare July 8, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant