[Vuejs]-Module not found error when adding worker-loader

0👍

Try replacing

import Worker from "worker-loader!./Worker.js";

With this snippet from the docs

import Worker from "./file.worker.js";

const worker = new Worker();

worker.postMessage({ a: 1 });
worker.onmessage = function (event) {};

worker.addEventListener("message", function (event) {});

if that doesn’t work I have had success by changing the previous line to

import Worker from 'worker-loader!./file.worker.js';

from this StackOverflow Answer

Leave a comment