standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.27k stars 147 forks source link

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

Open ishowman opened 5 years ago

ishowman commented 5 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 5 years ago

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