I was trying to import image using:
import image from 'image.jpeg';
the following error pops out.
Failed to load module script: The server responded with a non-JavaScript MIME type of "image/jpeg". Strict MIME type checking is enforced for module scripts per HTML spec.
in my index.html
, I imported my main script file as:
<script src="index.js" type="module"></script>
then in the index.js
:
import image from 'image.jpeg';
When I run it using Chrome, it results in the above-mentioned error. Any help?