Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

177
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda