[GH-ISSUE #627] Conflict when use with webpack #346

Closed
opened 2026-03-03 14:37:43 +03:00 by kerem · 2 comments
Owner

Originally created by @furyscript on GitHub (Oct 4, 2019).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/627

When I use this css into a webpack project, I have this warning

[... for every country...]
 warning  

Conflict: Multiple assets emit different content to the same filename img/vi.svg

 warning  

Conflict: Multiple assets emit different content to the same filename img/zw.svg

I think the problem is that there are two folder (1x1 and 4x3) with the icon as the same filename.

Originally created by @furyscript on GitHub (Oct 4, 2019). Original GitHub issue: https://github.com/lipis/flag-icons/issues/627 When I use this css into a webpack project, I have this warning ``` [... for every country...] warning Conflict: Multiple assets emit different content to the same filename img/vi.svg warning Conflict: Multiple assets emit different content to the same filename img/zw.svg ``` I think the problem is that there are two folder (1x1 and 4x3) with the icon as the same filename.
kerem closed this issue 2026-03-03 14:37:43 +03:00
Author
Owner

@lipis commented on GitHub (Oct 4, 2019):

but why they appear in the same folder?

<!-- gh-comment-id:538448287 --> @lipis commented on GitHub (Oct 4, 2019): but why they appear in the same folder?
Author
Owner

@klazutin commented on GitHub (Oct 14, 2019):

In my case this was happening because the file loader was configured as such:

 29        {
 30          test: /\.(png|svg|jpg|gif)$/,
 31          loader:
 32            'file-loader',
 33         options: {
 34           name: './images/[name].[ext]',
 35         },

and all images were dumped into the images folder with no regard to their initial path. Adding [path] to the name parameter allowed original folders to be maintained, so the 1x1 and 4x3 flags are no longer mixed together:
name: './images/[path][name].[ext]'

<!-- gh-comment-id:541490641 --> @klazutin commented on GitHub (Oct 14, 2019): In my case this was happening because the file loader was configured as such: ``` 29 { 30 test: /\.(png|svg|jpg|gif)$/, 31 loader: 32 'file-loader', 33 options: { 34 name: './images/[name].[ext]', 35 }, ``` and all images were dumped into the `images` folder with no regard to their initial path. Adding `[path]` to the name parameter allowed original folders to be maintained, so the 1x1 and 4x3 flags are no longer mixed together: `name: './images/[path][name].[ext]'`
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#346
No description provided.