Module not found, issue resolving from settings file
jebalert opened this issue · comments
Reason for this issue
Module not found: Error: Can't Resolve './img/whitebgLogo.png' in '/Users/joe/src'
Steps to Reproduce
In the override / output settings file, when I input
site: { logo: require("./img/whitebgLogo.png"), },
I get an error saying that it can't resolve it.
However, if I go directly into the themes entire factor-settings file and make the same change, it displays the logo (have to set both the inverse and the regular logo to get it to work).
is the file there relative to the original file?
Also, pro tip, they've been recommending to use imports for images instead of require
...
I think () => import("./img/whitebgLogo.png")
would work... however that's a separate issue from the resolution problem.
Thanks for the tip!
So it turns out the issue was location of the image. I was under the impression the image needed to be in the img folder where the theme images reside
Solution was to put the image in the location of the factor-settings that I'm working out of.
It's a workflow thing. Once I get the hang of it, it'll be a breeze.
Side note, I'll eventually make some documentation around the things I find as a new user of this platform lol.