title: Client-side Prism.js with npm
body: <p>I'm trying to use <strong>Prism.js</strong> syntax highlighter client-side as an <code>npm</code> dependency, instead of loading it from <code>&lt;script src="..."&gt;</code> tags. Here is the Prism reference in package.json</p>
  
  <pre><code>{
      "dependencies": {
          "prismjs": "^1.5.1"
      }
  }
  </code></pre>
  
  <p>And the way I'm trying to use it in my code</p>
  
  <pre><code>import Prism from 'prismjs'
  Prism.highlightAll();
  </code></pre>
  
  <p>This produces the following results:</p>
  
  <ul>
  <li>Tokenizing works for basic languages (html, javascript...)</li>
  <li>Tokenizing does not work for other specific languages (lua, handlebars...)</li>
  <li>For all languages, syntax coloring isn't applied (css file doesn't seem loaded)</li>
  </ul>
  
  <p>So I'm wondering</p>
  
  <ul>
  <li>Are there other language-specific packages (like prismjs-handlebars for instance)?</li>
  <li>Are there theme-specific packages (like prism-okaidia for instance) which would import the css?</li>
  </ul>
  
  <p>--</p>
  
  <p><strong>TL;DR</strong></p>
  
  <p><strong>How to load/use Prism.js client-side from <code>npm</code> instead of from script tags?</strong></p>