title: How to import a library like moment.js into a web worker
body: <p>Can I import a library installed with npm into a web worker?</p>
  
  <p>I need to use the <code>moment.js</code> library into a web worker.</p>
  
  <p>It is installed via <code>npm</code> into the <code>node_modules/moment</code> directory</p>
  
  <p>I already have tried with this at the top of the worker.js file:</p>
  
  <pre><code>importScripts('/node_modules/moment/moment.js');
  </code></pre>
  
  <p>But I get </p>
  
  <pre><code>GET http://192.168.2.1:8100/node_modules/moment/moment.js 404 (Not Found)
  </code></pre>