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.
-
-
Replying to @brianleroux
@brianleroux CJS modules use `.js` to mean "special function body", not script. Cowpaths all point to package.json config.1 reply 0 retweets 3 likes -
Replying to @brianleroux
@brianleroux afaict all module system cowpaths have a new entry point. CJS hides it; standard JS hides it; AMD adds boilerplate1 reply 0 retweets 0 likes -
Replying to @wycats
@brianleroux so following CJS cowpath introduces the same problem: how can you tell just by looking that a file is a CJS module1 reply 0 retweets 0 likes -
Replying to @wycats
@brianleroux in node, it's no problem: they're all CJS modules. In the browser you need to opt in via type=module.1 reply 0 retweets 0 likes -
Replying to @wycats
@brianleroux TypeScript and Babel use external config (tsconfig.json and package.json). Asset pipeline uses a config file extension.1 reply 0 retweets 0 likes -
Replying to @wycats
@brianleroux But fundamentally, things like Rails asset pipeline have the same problem distinguishing script vs. CJS module as we have here1 reply 0 retweets 0 likes
@brianleroux I don't think there's a way out no matter which cowpath TC39 decided to pave (we chose node: http://jsmodules.io/ )
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.