This repository was archived by the owner on Apr 1, 2023. It is now read-only.
This repository was archived by the owner on Apr 1, 2023. It is now read-only.
How to import svg as component #223
Open
Description
Using CRA, i was able to import svg like component and inline it:
import { ReactComponent as skip } from '../../../assets/icons/skip.svg';
But if i try it, i will get an error:
Error: 'ReactComponent' is not exported by src/assets/icons/skip.svg, imported by src/components/shared/Icon/Icon.component.tsx
If i import like this:
import skip from '../../../assets/icons/skip.svg';
i will get link to svg, but i need inline svg code.
Metadata
Metadata
Assignees
Labels
No labels