Can't find 'path' in worker using Electron & Webpack

Viewed 92

My electron app uses a worker to compile WASM in the background (through worker-loader). However, I get the following error when running it:enter image description here

How would I solve this error? It looks like the module is trying to use path, so I've added the path fallback in Webpack config:

enter image description here

However, this didn't fix my issue

worker.js

import { Essentia, EssentiaWASM } from 'essentia.js';
let essentia = new Essentia(EssentiaWASM);

self.addEventListener('message', (event) => {
  console.log(essentia.version);
})
0 Answers
Related