The question is that I am having 10 images in my public
folder and I want to use them in a component. Instead of writing
import imgurl1 from "../../public/celsius.gif";
import imgurl2 from "../../public/compass.gif";
import imgurl3 from "../../public/rain.gif";
.
.
.
import imgurl8 from "../../public/thermo.gif";
import imgurl9 from "../../public/sunset.gif";
import imgurl10 from "../../public/wind.gif";
the above code, I want to use something more neatly and clean code? Is there any way not to repeat the same line and import all of them?
I am assuming something like
import { imgurl1,imgurl2,...imgurl10, } from "../../public";