standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 146 forks source link

Is there a recommended way to use esm for smooth upgrade once Node.js support ESModule ? #838

Open ishowman opened 4 years ago

ishowman commented 4 years ago

Before Node.js finally support ESModule, I apply esm to my project. For upgrading smoothly once Node.js support it, I draw a plan like this:

So is there a smooth and convenient upgrade solution recommended?

gudinoff commented 4 years ago

What if instead of "index.mjs" you name the file as "index.main.js"?