Skip to main content

Search

Items tagged with: ECMAScript


If you’re running a relatively recent version of Node.js – I’m on 22.x for Kitten¹ at the moment– and you use ES Modules (because, of course, you use ES Modules, right, because it’s almost 2025…) and you want to use .js extensions and not have to litter package.json files with "type": "module" all over the place, you can start Node with the following flag and it should Just Work™ ;)

--experimental-default-type

¹ kitten.small-web.org

#NodeJS #ESM #ECMAScript #JavaScript #modules