The ES* modules vs CJS modules thing shows that TC39 got it wrong. Time to get back to the drawing board and have a look at the cowpaths.
@brianleroux so following CJS cowpath introduces the same problem: how can you tell just by looking that a file is a CJS module
-
-
@brianleroux in node, it's no problem: they're all CJS modules. In the browser you need to opt in via type=module. -
@brianleroux TypeScript and Babel use external config (tsconfig.json and package.json). Asset pipeline uses a config file extension. -
@brianleroux But fundamentally, things like Rails asset pipeline have the same problem distinguishing script vs. CJS module as we have here -
@brianleroux I don't think there's a way out no matter which cowpath TC39 decided to pave (we chose node: http://jsmodules.io/ )
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.