AMD simplifies modularizing JavaScript applications but as it is not a browser built-in mechanism a loader library is still needed to bootstrap the process. Fortunately it is possible to write a loader that supports plugins in less than 850 characters of optimized code.
The loader implemented here:
- works in any modern browser without using any ES6 features like Promises,
- exposes basic AMD functions: define and require,
- is designed to be as small as possible after compression with Uglify.js while still being readable,
- can be extended by defining new loader plugins,
- does not preserve compatibility with require.js.
Your new post is loading...