So I have an assets folder in src. This contains an SVG of my logo.
I import it in a component using:
import Logo from '/src/assets/logo.svg';
This is 100% the right path, and running the local npm run develop server the SVG loads fine. Now, when I push changes to the repository, so netlify builds the site, I get an error:
4:02:22 PM: failed Building production JavaScript and CSS bundles - 25.063s
4:02:22 PM: error Generating JavaScript bundles failed
4:02:22 PM: Can't resolve '../assets/logo.svg' in '/opt/build/repo/src/components'
4:02:22 PM: If you're trying to use a package make sure that '../assets/logo.svg' is installed. If you're trying to use a local file make sure that the path is correct.
I'm not trying to use it as a component (IF POSSIBLE), just put an img src as the SVG. However, as you can see it fails in the building process. Can anyone help?