Tengo un problema con webworker. Tener esta línea para crear:
public dbWorker = new Worker(new URL('./workers/db-worker.worker', import.meta.url), { type: 'module' });
Y sale un error:
Refused to execute script from 'https://...worker.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. Parece necesario agregar text/javascript pero no estoy seguro. Intenté algo como esto, sin éxito:
// content = './workers/db-worker.worker'; // worker_url = URL.createObjectURL(new Blob([this.content], { type: "text/javascript" })); // dbWorker = new Worker(this.worker_url, { type: 'module' });