DEV Community

Discussion on: How to use ES6 import syntax in Node.js

 
rsa profile image
Ranieri Althoff

Yes, that's the point of transpilers, just add a build step that converts the code for you instead of doing it manually.

If that's a small project, and it will not be bundled into a web app (i.e. it's a Node package), then just use the CommonJS version. That's what I do in node-argon2.