5 ms·
How does this differ from the requirejs module for Node? https://www.npmjs.org/package/requirejs https://www.npmjs.org/package/requirejs
by alistairjcbrown 12y ago
How does this differ from the requirejs module for Node?
https://www.npmjs.org/package/requirejs https://www.npmjs.org/package/requirejs
- spencera 12y agoLooks like it offers a subset of the features by allowing you to use the same require() function for both amd and commonjs modules. https://gist.github.com/spenceralger/946ddc6c55d997d4a028 https://gist.github.com/spenceralger/946ddc6c55d997d4a028
- alistairjcbrown 12y agoAh, thank you - I misunderstood the crucial piece "load AMD modules like ... they were native Node modules". I guess I can see the value in this, if you're retrofitting a new module in the AMD style to an existing node application which does not use that style.
- wildpeaks 12y agoThe requirejs module has both the server-side loading modules and the optimizer that compiles to a single file whereas this new one only does the server-side loading of modules as far as I can tell.