When comparing Qoopido.demand vs stealjs, the Slant community recommends stealjs for most people. In the question“What are the best client-side JavaScript module loaders?” stealjs is ranked 2nd while Qoopido.demand is ranked 5th. The most important reason people chose stealjs is:
StealJS has support for AMD, CJS and ES6 module types.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Supports localStorage caching
Modules will get loaded via XHR/XDR and get cached in localStorage to prevent further requests which improves performance escpecially on mobile
Pro Fallback URLs
Any type of dependency can have multiple URLs defined to be used as fallback.
Pro Additional support for loading HTML, CSS, JSON, and text
Loading is dealt with via handlers
that are themselves modules (dynamically loaded and cached). Qoopido.demand comes with support for its own module format built-in and offers handlers
for css
, json
and text
. Due to handlers
being modules themselves it is really easy to write custom handlers.
Pro Optional support for SRI (sub resource integrity)
Support for SHA256, 384 and 512 identity checks for all types of loaded modules was added in version 2.0.7
Pro Offers internal auto-bundling to reduce the number of requests
By taking advantage of auto-bundling, it means that demand itself will combine requests without the user having to manually define a bundle.
Pro Supports sourcemaps
Pro Optional lz-string compression of localStorage cache content
Cached modules can be optionally & automatically compressed with lz-string loading a plugin (included in the distribution) either globally or on a per module or even per path/part of path base.
Pro Per module setting of cache parameters
Version 1.1.2 of Qoopido.demand adds the possibility to not only set global caching parameters valid for all modules but allows for fine grained cache control on a per module basis.
Pro Can load new modules without being recompiled
It's the one of the few modules in this category that can handle IOC-style dependency injection. The others work well for apps that have knowable dependency lists at compile time, but this is one of the few that can load new modules without being recompiled.
Pro Optional cookie support to communicate module caching state to the server
Cookie support within Qoopido.demand can be enabled globally or per module. Whenever the localStorage cache for a module changes an accompanying cookie gets updated/deleted so the server can handle the clients module caching state and, e.g., inline modules as long as the client das not have them in localStorage.
Pro Supports loading of non-module scripts
Qoopido.demand offers loading of legacy scripts as if they were modules through probe
functions. These probe
functions are similiar to Require.js shim
, but where shim
allows only string parameters, Qoopido.demand's probes
are JavaScript functions that can check whatever you want.
Pro Promise like interface
Although not depending on native promise support it offers a promise like interface which greatly improves readability of code
Pro Supports nested dependencies
Dynamically loaded modules can have further dependencies that will get dynamically resolved and loaded
Pro localStorage caching removes the need to bundle
It enables and encourages the development of atomic modules that do not necessarily have to get bundled (manually or via build-process) to gain performance
Pro Support for legacy browsers
Qoopido.demand has recently added support for legacy browsers. Including IE8.
Pro Supports loading of bundles
From version 1.1.1 onwards Qoopido.demand is able to load multiple concatenated modules in a single request (like jsdelivr) while maintaining automatic module resolution.
Pro Supports several modules types
StealJS has support for AMD, CJS and ES6 module types.
Pro Support for LESS and CSS
StealJS can also load CSS and LESS files in addition to JavaScript modules.
Pro Mix ES6 AMD and CommonJS
StealJS supports using all three module types, even in the same file.
Pro ES6 module support
StealJs supports ES6 modules and their import
and export
methods without having to compile them to CommonJS require
.
Pro Support for ES6
StealJS supports transpiling of ES6 code to ES5
Pro Supports all systemjs based plugins
Pro Supports source maps for easier debugging
Source maps allow for easier debugging, because they allow you to find the problems within the origin files instead of the output file.
Pro Share the same modules client-side and server-side
Because StealJS allows you to use the same require()
function as node.js, you can easily share modules between the client-side and server-side.
Pro Tap into npm's huge module ecosystem
Using StelaJS opens you up to npm, that has over 80k modules of which a great amount work both client-side and server-side. And the list is growing rapidly.
Cons
Con Changing the order of require statements causes unexpected behavior
Sometimes changing the order of the require
statements in a JavaScript file loaded with stealjs may cause unexpected problems or even breaking the code altogether.