GoogleChromeLabs/worker-plugin

'reactHotLoaderGlobal' is not defined

Opened this issue · 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 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.