worker-plugin icon indicating copy to clipboard operation
worker-plugin copied to clipboard

'reactHotLoaderGlobal' is not defined

Open sjsakib opened this issue 6 years ago • 1 comments

I was using this plugin successfully with Gatsby version 2.7.5. But when I tried to upgrade Gatsby to 2.17.15 I'm getting this error.

/home/sakib/codes/personal/blog/src/posts/may-2019/SlidingPuzzle/main.worker.js
  6:5   warning  '__signature__' is assigned a value but never used  no-unused-vars
  6:67  error    'reactHotLoaderGlobal' is not defined               no-undef

I'm not sure whats going on. Is it possible that gatsby and worker-plugin is using different configuration for compiling?

sjsakib avatar Nov 16 '19 09:11 sjsakib

@sjsakib it's strange that you would be getting an ESLint error on generated output.

Gatsby needs to configure react-hot-loader to only be applied to the main Compilation. It appears they are applying it to all contexts, which breaks this plugin and likely many others.

developit avatar Jan 04 '20 17:01 developit