|
|
|
|
|
by ComputerGuru
1090 days ago
|
|
> Adding promises later would be challenging and leave technical debt. I wrote an "aio loader" many years ago that can load (in the browser) AMD/CommonJS/node or just "include this script in your html" dependencies that asynchronously loads dependencies (and their own dependencies) with support for use via plain `require()` without callbacks, `require(foo, foo => {})` callback support, and even dynamic async loading (`var App = await requireAsync("foo")`). I never published it publicly (it's just ticking away on our production sites) but I was motivated to push it to GitHub just now [0]. [0]: https://github.com/mqudsi/loader |
|