When I’m coding with python I often check the implementation of the packages I’m using to see how they work and how they’re implemented etc.
When working with JS, I try to do that but usually find the minified code installed in my node_modules thus I can only view the .d.ts files which show the signatures but not the implementation.
I can see the source on github but it’s not too convenient as I prefer viewing the source from my IDE and without leaving my project.
e.g. ctrl+clicking react’s useEffect in VSCode takes me here:
which I guess is the declaration file for https://github.com/facebook/react/blob/8b08e99efa56b848538768e25265fd3aa24dd8a1/packages/react/src/ReactHooks.js#L89
Is there a way to get and navigate in the source of the js packages locally ?
Maybe a way to tell npm to pull unminified versions of the code ?
1