import image is not working in javascript

I am trying to import an image in javascript but don’t know why it not working infact it stop my whole javascript file from doing anything

import img from './image.png'
console.log(img)

It’s not showing anything in console not even any type of error and if I write more code below it that also don’t work.