title: How can I require a html template with Browserify
body: <p>I'm trying to figure out an easy way to require a html template in the script and then run browserify from the CLI.</p>
  
  <p>Say I want to grab a template and append it to the body.</p>
  
  <pre><code>//index.js
  
  var template = require('./template.html');
  document.body.appendChild(template);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;!-- template.html --&gt;
  &lt;p&gt;Woooo!&lt;/p&gt;
  </code></pre>
  
  <p>Then using the CLI to wrap it all up in Browserify.</p>
  
  <p><code>browserify index.js &gt; build.js</code></p>
  
  <p>When loading an index.html template in the browser that references <code>build.js</code> I get this error in the console:</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;
  </code></pre>
  
  <p>which is referencing</p>
  
  <pre><code>....
  
  },{}],3:[function(require,module,exports){
  &lt;div class="slide"&gt;
      &lt;h2 data-slide-title&gt;&lt;/h2&gt;
      &lt;div data-slide-copy&gt;&lt;/div&gt;
  &lt;/div&gt;
  },{}]},{},[1])
  </code></pre>