DEV Community

Discussion on: Web-workers in Create React App (CRA) without unmounting

Collapse
yonixw profile image
Yehonatan Water Man

I had to use the defenition of "typings/custom.d.ts" from stackoverflow.com/questions/613825...

// typings/custom.d.ts
declare module "worker-loader!*" {
  class WebpackWorker extends Worker {
    constructor();
  }

  export default WebpackWorker;
}
Enter fullscreen mode Exit fullscreen mode