[GH-ISSUE #1092] Problems when using this package #514

Closed
opened 2026-03-03 14:38:57 +03:00 by kerem · 1 comment
Owner

Originally created by @flazouh on GitHub (Mar 20, 2023).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/1092

I'm using webpack and a react project, i'm importing the css like this in my component:
import "node_modules/flag-icons/css/flag-icons.min.css";

I had to make the following modification in my webpack.config.js so that the css is loaded
Screenshot 2023-03-20 at 16 40 16
Screenshot 2023-03-20 at 17 23 48

and using a
<span className="fi fi-gr"></span>

First of all this happens in my project root folder, all the svgs are "created with weird ids"
Screenshot 2023-03-20 at 16 38 27

And secondly, when opening the html page, the flags are not loaded:
Screenshot 2023-03-20 at 16 39 20

Any help would be greatly appreciated! Thanks in advance :)

Originally created by @flazouh on GitHub (Mar 20, 2023). Original GitHub issue: https://github.com/lipis/flag-icons/issues/1092 I'm using webpack and a react project, i'm importing the css like this in my component: `import "node_modules/flag-icons/css/flag-icons.min.css";` I had to make the following modification in my webpack.config.js so that the css is loaded <img width="601" alt="Screenshot 2023-03-20 at 16 40 16" src="https://user-images.githubusercontent.com/25705704/226391697-0f8b4f8b-6785-44f6-acb0-ced669832ffa.png"> <img width="644" alt="Screenshot 2023-03-20 at 17 23 48" src="https://user-images.githubusercontent.com/25705704/226404587-81fa337a-1e92-4a73-bcf8-ae43d74f4db8.png"> and using a `<span className="fi fi-gr"></span>` First of all this happens in my project root folder, all the svgs are "created with weird ids" <img width="447" alt="Screenshot 2023-03-20 at 16 38 27" src="https://user-images.githubusercontent.com/25705704/226391207-53e33016-76d2-4481-997b-0e779a7a3ec5.png"> And secondly, when opening the html page, the flags are not loaded: <img width="1196" alt="Screenshot 2023-03-20 at 16 39 20" src="https://user-images.githubusercontent.com/25705704/226391435-27e38306-2828-44ec-b072-13c71f02c1fa.png"> Any help would be greatly appreciated! Thanks in advance :)
kerem closed this issue 2026-03-03 14:38:57 +03:00
Author
Owner

@lrljoe commented on GitHub (Mar 24, 2023):

Can you post the rest of your webpack and any included files/configs please

The problem is likely with the output section

<!-- gh-comment-id:1483306261 --> @lrljoe commented on GitHub (Mar 24, 2023): Can you post the rest of your webpack and any included files/configs please The problem is likely with the output section
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#514
No description provided.