L
L
lexstile2019-09-17 15:03:57
React
lexstile, 2019-09-17 15:03:57

How to do svg export in react?

styles/assets.js:

// такой вариант работает, не хотелось бы понять, как можно экспортнуть без промежуточного импорта.
import close from './icons/close.svg';
export const test = close;

I need to export svg in this file so that I can include it in another file like this:
import close from 'assets';
// или
import { close } from './styles/assets';

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question