For some reason using the name module removed the code highlighting so
I added the comments which fixed it....
In you example the entire module file is not loaded. And it is not correct to say that it can be. Module exports is not a file based module loader. Module functionality technically could be spread over many files. But, if you create a default and put everything in it that would be nearly the same thing.
(Assuming you are only using a single file to define your module.)
module.js
export const name = /** < **/ module /** name >**/;
export default /** < **/ module /** name >**/;
You could then use named exports as before or using one of the import default syntax variations grab the entire file.
app.js
import /** < **/ module /** name> **/ from './modules.js';
or alternatively
import {default as /** < **/ module /** name> **/} from './modules.js';