andywer/threads-plugin

Use threads-plugin with SSR

オープン

#8 opened on 2019/10/11

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (5 件のフォーク)github user discovery
help wanted

Repository metrics

Stars
 (29 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド