<story><title>Can you help me understand the benefit of require.js?</title><url>https://gist.github.com/desandro/4686136</url></story><parent_chain></parent_chain><comment><author>oinksoft</author><text>This post doesn&amp;#x27;t contain an argument so much against require.js as against module systems as a whole. I think that is short-sighted for any project where performance is important because the fact is, most projects of that kind are still using Closure Compiler which in spite of being slow, produces much smaller, more efficient code than does Uglify. Particularly, the project will be compiled with ADVANCED_OPTIMIZATIONS which can break code that will work when uncompressed (when literal property names are not written as strings or externs are not defined properly, mainly). I think any compiler with really high quality output will probably be somewhat finicky with its inputs, so Closure Compiler is not unique in that regard.&lt;p&gt;But if you don&amp;#x27;t buy into compilation as a step in your frontend development cycle, I&amp;#x27;m not sure there&amp;#x27;s much point in using require.js, goog.provide&amp;#x2F;require, or any other module system.</text></comment>
<story><title>Can you help me understand the benefit of require.js?</title><url>https://gist.github.com/desandro/4686136</url></story><parent_chain></parent_chain><comment><author>andreypopp</author><text>Use browserify — &lt;a href=&quot;http://browserify.org&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;browserify.org&lt;/a&gt;&lt;p&gt;Compared to require.js browserify has the following benefits:&lt;p&gt;* CommonJS module format which is less verbose than AMD&lt;p&gt;* it uses node_modules&amp;#x2F; dir to load dependencies from so&lt;p&gt;* ... you can use npm to install dependencies&lt;p&gt;* ... and if you use Node.js then that facilitates code sharing between your client and server</text></comment>