4 ms·
and it DOES work with everything ... so long as you wrap all the files in the particular variant of define() function that works with requirejs (but not with o
by substack 14y ago
and it DOES work with everything
... so long as you wrap all the files in the particular variant of define() function that works with requirejs (but not with other competing AMD function signatures). And then you might want to use some modules written for commonjs or node with `exports`, so you'll need a tool to transform those files. And then you'll probably want to compile the application into a single javascript bundle in production for performance.
I'm not saying bower is any better in any of these respects, just that everything is terrible.
- Zr40 14y agoNope, RequireJS can load any kind of Javascript dependency, even if it doesn't use the AMD format. You can even specify dependencies for non-AMD scripts in the configuration object.[0] As for define(), there's only one AMD method signature: define([[name,] deps,] fn). Any loader that does not accept this signature cannot legitimately call itself an AMD loader. [0] http://requirejs.org/docs/api.html#config-shim http://requirejs.org/docs/api.html#config-shim