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

125
Vistas
How to import modules with web workers?

How do I import a library like jimp or moment in a Web worker?

I tried to follow the answers given here How to import a library like moment.js into a web worker, but they did not work:

With the entry point, the bundle file was never produced and I couldn't use the web worker.

With the web-worker, it says Attempted import error:

'./myWorker.worker.js' does not contain a default export (imported as 'Worker').

I also tried the solution given here:

Web Workers - How To Import Modules

I was able to access the WebWorker and get it to post a message (unlike in the above solutions), but as soon as I add import statements, it just gives an error like this:

enter image description here

How can I fix this?

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