DEV Community

Discussion on: Top Level Await in Node

Collapse
 
alexandreleduc profile image
Alexandre Leduc

"or renaming your .js file to .mjs"

files with an S. There's no mixing of files that have require() anywhere in them. When I fist read the above I was hoping I wouldn't have to refactor so much files. Renaming files to .mjs serves no purpose that I see. You are going to have to refactor all the require statements in the code no matter what. The additional labor of renaming files feels pointless.