4 ms·
Is there any reason we can't just have a `'use esm';` declaration at the top of a file instead of a janky filename extension? It's just as arbitrary, but there
by keithwhor 8y ago
Is there any reason we can't just have a `'use esm';` declaration at the top of a file instead of a janky filename extension?
It's just as arbitrary, but there's precedence with `'use strict';`, and instead of renaming all of my files I just prepend them appropriately.
- jdd 8y agoThe `esm` loader allows specifying a parse goal pragma as one of several ways to disambiguate source – https://npmjs.com/esm https://npmjs.com/esm. Node will likely end up needing more than just an extension to disambiguate as well.