So I copied a code in react to native javascript. I have a folder named imgs
this folder contains all the images and an index.js file that looks like this.
export { default as img1 } from "./one.jpg";
export { default as img2 } from "./two.jpg";
export { default as img3 } from "./three.jpg";
export { default as img4 } from "./four.jpg";
export { default as img5 } from "./five.jpg";
Now I tried to import these images to another file like this
import { img1, img2, img3, img4, img5 } from "./imgs";
and I get an error in my console
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
this works like a charm when I used it in CRA but it doesn't work here. What am I missing