title: What is the difference between browserify external vs. exclude?
body: <p>I'm using <code>browserify</code> and trying to get it to skip wasting time including or parsing jquery and other <code>require</code>-less files I've loaded via CDN.</p>
  
  <p>Should I use <code>bundle.exclude('jquery')</code> or <code>bundle.external('jquery')</code>?  What is the difference?  Their output seemed identical, and the docs are unclear to me:</p>
  
  <ul>
  <li><code>b.external</code>: <a href="https://github.com/substack/node-browserify#bexternalfile">https://github.com/substack/node-browserify#bexternalfile</a></li>
  </ul>
  
  <blockquote>
    <p>Prevent file from being loaded into the current bundle, instead
    referencing from another bundle.</p>
    
    <p>If file is an array, each item in file will be externalized.</p>
    
    <p>If file is another bundle, that bundle's contents will be read and
    excluded from the current bundle as the bundle in file gets bundled.</p>
  </blockquote>
  
  <ul>
  <li><code>b.exclude</code>: <a href="https://github.com/substack/node-browserify#bexcludefile">https://github.com/substack/node-browserify#bexcludefile</a></li>
  </ul>
  
  <blockquote>
    <p>Prevent the module name or file at file from showing up in the output
    bundle.</p>
    
    <p>If your code tries to require() that file it will throw unless you've
    provided another mechanism for loading it.</p>
  </blockquote>