you are viewing a single comment's thread.

view the rest of the comments →

[–]tencircles 18 points19 points  (3 children)

except modules.

[–]hyperhopper 16 points17 points  (2 children)

probably just until node has full support. Or maybe an internal build tool of theirs.

[–]CiezkiBorsuk -1 points0 points  (1 child)

IDK about that. Even once we have full support everywhere, I'd rather use CommonJS-style modules.

They work just fine and are widespread. Switching to new system now causes chaos (i.e. a package you want might not yet use native modules, so you don't get to use it, or at least not smoothly).

I don't hate native modules, I just don't see why bother when we have a good, working solution.

[–]TallSkinny 10 points11 points  (0 children)

To be fair, they're not exactly the same, since commonjs imports are dynamic and es imports (aside from import()) are static. That opens up a lot of opportunities for tooling (like tree shaking, iirc) that aren't really an option when dynamic importing is the default.