I have a React application created using Vite. I am also using Styled Components. Everything works fine, except when I specify my background image, it is not creating a correct path.
As you can see, it's injecting "@fs" along with a physical path. Here is my relevant code:
import styled from 'styled-components';
import spinner from '../../images/spinner.svg';
const WaitSpinnerContainer = styled.div`
display: flex;
flex-direction: row;
align-items: center;
max-height: 100%;
background-image: url('${spinner}');
`;
I guess what I'm expecting is for the url to either be a relative path or a base64 encoded image.