Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
Creating dynamic WebWorker ( Refused to execute script from because its MIME type ('text/html') )

Have problem with webworker. Have this line for creating:

public dbWorker = new Worker(new URL('./workers/db-worker.worker', import.meta.url), { type: 'module' });

And get an 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.

Seems need to add type text/javascript but I'm not sure. Tried something like this, without successful:

// content = './workers/db-worker.worker';

// worker_url = URL.createObjectURL(new Blob([this.content], { type: "text/javascript" }));

// dbWorker = new Worker(this.worker_url, { type: 'module' });
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda