Tiny replacement of require.js powered by promises
It's library with require.js compatible API and full support of plugins. We are focusing on small size and use promises which are native in most browsers. Some of features we don't support for now, but most part of functions works properly. Look at examples in our tests.
Generally you can just switch from original require.js
to our require-mini
without any code modifications and will get advantage of lesser code which takes time to load.
Documentation from require.js also applicable here.
Additionaly, because we are using promises, you will get support of asynchronus defines wihout any plugins
define('userData', ['fetch'], function(fetch) {
return fetch('/api/profile');
});
These features is not supported yet, but you can vote for its resolution
via Bower
bower install require-mini --save
- Update some libraries
- Some CommonJS support.
define('foobar',function(require,module,exports))
to
define('foobar',function(require,exports,module))
to make it same as in require.js