Is My Use of JavaScript import Statements Correct? [closed]

I’ve read the MDN documentation, but it feels like a lot of information, and as a non-native English speaker, I’m not sure if I’ve understood everything correctly. What I want to do is have a main.js file that imports other JavaScript files, such as lightbox.js, clipboard.js, etc. Is this approach correct?:

main.js:

import "./custom";
import "./lightbox"

The files are in the same folder as the main.js file. I’m using ESBuild, and everything seems to be working, but I’m not sure if I did it correctly. I often see import statements with the from keyword, but in my case, I’ve imported the whole files directly, which is what I actually want. Is this the right approach?