Re:ECMAScript modules in Node.js: the new plan
by through on Wednesday December 26, 2018 @03:21PM
(#18764556)
I completely agree. As I pointed out below, following the path you suggested, if the filetype has to change to fix the require regression, they could use .es. Would it be surprising to use .es with ECMAScript? No.
Re:ECMAScript modules in Node.js: the new plan
by chmln on Wednesday December 26, 2018 @03:30PM
(#18764612)
Requiring users to adopt a new extension is a massive change and as an end-user I have nothing to gain from this - I'm already using babel and typescript along with a huge part of the community.
If this creates regressions like you said, let users deal with their code that deletes things from frozen objects. Allowing bad behavior to continue and stall the module evolution is questionable at best.
There is no usecase for having two module syntaxes at the same time. All the big projects already use babel or typescript. The community would catch up eventually.