alameda
loader
alameda | loader | |
---|---|---|
1 | 1 | |
193 | 0 | |
0.0% | - | |
10.0 | 7.9 | |
over 4 years ago | 9 months ago | |
JavaScript | TypeScript | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
alameda
-
CommonJS Is Hurting JavaScript
FWIW they did it[0]. Alameda is promise based AMD
[0]: https://github.com/requirejs/alameda
loader
-
CommonJS Is Hurting JavaScript
Your first point is absolutely spot-on but I am curious as to how much treeshaking was on the minds of masses at the time. The tooling of that era didn't really have any good support for tree shaking even for non-AMD includes and it was quite experimental tech (as in, I don't think it was a decision making factor for the majority of the tools on the scene).
The second point actually isn't strictly valid. I've written my own "all-in-one" async custom loader [0] that can require() CommonJS/AMD includes or regular "add a script tag" includes w/out any exports, all asynchronously, with asynchronous dependency trees for each async dependency in turn. You can define in the HTML source code a "source map" that maps each dependency name to a specific URL, so that you don't need knowledge of the filesystem tree to load dependencies.
Ideally, this source map can be generated via the tooling you use to compile the code (e.g. `tsc` is aware of the path to each dependency) but I haven't written my own tool to generate the require path to url map.
[0]: https://github.com/mqudsi/loader
What are some alternatives?
esm - Tomorrow's ECMAScript modules today!
webpack-common-shake - CommonJS Tree Shaker plugin for WebPack
meta - Meta discussions and unicorns. Not necessarily in that order.