mirror of
https://github.com/lipis/flag-icons.git
synced 2026-04-26 09:25:50 +03:00
[GH-ISSUE #514] Angular 6: change svg build folder #307
Labels
No labels
3rd-party
3rd-party
bug
code
documentation
enhancement
fixed-in-master
flag-request
help needed
missing-flag
missing-flag
pull-request
wrong-flag
wrong-flag
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flag-icons#307
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BenDevelopment on GitHub (Dec 17, 2018).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/514
Hi,
When I build my project using
ng build, all the svg flags are copied in the project dist root folder.Is there a way to define another path to put all the svg flags?
Thanks!
@lipis commented on GitHub (Jan 7, 2019):
Not sure how to help here.. sorry!
@oguzhan-arslan commented on GitHub (Jan 11, 2019):
I found a workaround for this, however you cannot use npm this way. After I got the flag-icon-css package all my ratios were wrong (1x1) and I could not fix it. After looking into the style that got loaded in i did not see an indication of 4x3 or 1x1, just the name of the file.
After a closer look it had put all the flags into the root of my build folder. To fix this I just downloaded the css file and got all the flags in the correct folder, so both 1x1 and 4x3. These i put in the assets folder.
So you get:
Now in the flag-icon.css change the url src from "../flags/...." --> "../img/flags/..."
After this angular.json under assets, make sure "src/assets" is included in the assets propery and finaly in your index.html add:
This will make sure the build folder is neat and structured, and you can use the css selectors throughout your application. Also this fixed the aspect ratio for me..
Hope this helps
@BenDevelopment commented on GitHub (Jan 11, 2019):
Thank you @o-arslan, this is a good solution but it will break the npm link as you said. No more npm update :(.
Another problem is that it will add css and flags img in source control.
@Amakaev commented on GitHub (Mar 29, 2022):
@BenDevelopment the only way i be able to make it to present flag-icons.min.css as assets as well as svg's
Add following instruction to
angular.jsonAnd add direct link
<link href="assets/flags/flag-icons.min.css" rel="stylesheet">toindex.html