I have multiple svg files and I want to import and export all of them in a single file:
icons.js
import IconVideoOn from '../../assets/img/icons/video-on.svg';
import IconVideoOff from '../../assets/img/icons/video-off.svg';
import IconMicOn from '../../assets/img/icons/mic-on.svg';
import IconMicOff from '../../assets/img/icons/mic-off.svg';
.
.
.
export default {
IconVideoOn,
IconVideoOff,
IconMicOn,
IconMicOff
};
then I'm importing them like this
MyComponent.jsx
import { IconVideoOn } from '../../components/Icons/icons';
But I'm getting this error on my component, can't figure out why:
./src/components/MyComponent/MyComponent.jsx Attempted import error: 'IconVideoOn' is not exported from '../../components/Icons/icons'.