mockdeep / typewiz

Automatically discover and add missing types in your TypeScript code
https://medium.com/@urish/manual-typing-is-no-fun-introducing-typewiz-58e3e8813f4c
1.1k stars 46 forks source link

$_$twiz is not defined when using typewiz-webpack in a Gatsby (React) project #112

Open madeleineostoja opened 4 years ago

madeleineostoja commented 4 years ago

I'm migrating a Gatsby project to Typescript and trying to use Typewiz for it. I've set it up in webpack config, but I'm getting the following error whenever I try and run a build:

ReferenceError: $_$twiz is not defined

I think because Gatsby SSRs the project, and $_$twiz isn't available in Node? I dunno, just a guess.


Edit: On second thought that can't be the issue, because it breaks in dev too which just runs webpack dev server normally