title: How to import wasm in web workers with webpack?
body: <p>is it possible with webpack to import wasm in workers? In my normal js code i can import wasm like this:</p>
  
  <pre><code>import('../wasm/hello_world.wasm').then(module =&gt; {
      console.log(module.add_one(9))
  })
  </code></pre>
  
  <p>the same code does not work inside a worker. It returns the following error message:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property './src/wasm/hello_world.wasm' of undefined
  </code></pre>
  
  <p>My webpack config is a combination of the webpack worker and wasm examples.</p>
  
  <ul>
  <li><a href="https://github.com/webpack/webpack/tree/master/examples/web-worker" rel="noreferrer">https://github.com/webpack/webpack/tree/master/examples/web-worker</a></li>
  <li><a href="https://github.com/webpack/webpack/tree/master/examples/wasm-simple" rel="noreferrer">https://github.com/webpack/webpack/tree/master/examples/wasm-simple</a></li>
  </ul>