Monday, 7 January 2019

Is it recommended to use ES modules or stick to commonjs modules for now?

Hi!I'm new to node world and I'd like to know what is the current best practice with modules. I've seen in many tutorials that people are using commonjs modules but some are using esm. I know node supports it with .mjs file extension and a special flag but its not ?released? yet. Also I'm more familiar with esm since I used that on some frontend projects.Should I use ESM in new projects or not? If yes should I use bundlers or --experimental-modules and .mjs files or something else?Thanks​​

Submitted January 07, 2019 at 10:41AM by sovietspy2

No comments:

Post a Comment