muffinresearch / payment-icons

💳 Payment / Ecommerce related svg icon packs
Mozilla Public License 2.0
703 stars 129 forks source link

Import fails #54

Open arturhun opened 5 years ago

arturhun commented 5 years ago

I don't know for others, but in an Angular cli app the suggested way of importing images doesn't compile for me (nor is it scalable - but that's another story):

import visa from 'payment-icons/min/flat/visa.svg';
import mastercard from 'payment-icons/min/flat/mastercard.svg';
import maestro from 'payment-icons/min/flat/maestro.svg';
import amex from 'payment-icons/min/flat/amex.svg';

image

Do you have a solution for that?

muffinresearch commented 5 years ago

Unfortunately I can't help there, the examples given in the readme should work for a webpack built app assuming the relevant loader is configured.