strothj / react-docgen-typescript-loader

Webpack loader to generate docgen information from Typescript React components.
Other
360 stars 47 forks source link

fix: hot reload #55

Closed nekitk closed 4 years ago

nekitk commented 4 years ago

Fixes https://github.com/strothj/react-docgen-typescript-loader/issues/43

Currently docgen isn't updated during HMR. Fixed it by upping updated file version so TS would know to update it in cache.

One drawback though: if you're importing type from another file hot reload would not work when you change file with export, but will work when you update file which imports the type.

strothj commented 4 years ago

Thanks for the pull request. Working getting this out there now.

strothj commented 4 years ago

Merged!