andywer/threads-plugin

Use threads-plugin with SSR

Ouverte

#8 ouverte le 11 oct. 2019

 (8 commentaires) (0 réaction) (0 personne assignée)JavaScript (5 forks)github user discovery
help wanted

Métriques du dépôt

Stars
 (29 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Hi,

I am getting an error when I try to use the loader in SSR.

Captura de pantalla 2019-10-11 a las 11 34 29

Basically the loader is creating a new file from my worker called 0.worker.js and putting it in the folder where the server code has been compiled.

However, when I try to run this code,

  const greeter = await spawn(new Worker('./worker'))
  const {response} = await greeter({name: 'Carlos'})
  console.log(response)
  await Thread.terminate(greeter)

I get the error.

Any suggestions ?!

Thx!

Carlos

Guide contributeur