'Can I debug an npm project dependency from the project using it?
I have a Create-React-App project and I added a postbuild script for react-snap (a snapshot utility based on puppeteer), while the snapshot is being created react-helmet (another dependency) enters its "dom has no children" mode and processes which tags should be added to the static html.
I need to debug a react-helmet feature that isn't working properly (priority tags) and I need a method to either debug the code in my ide or be able to print some logs from the locally installed module.
In other words I need to debug react-helmet while it's running in an headless browser and for me that happens through puppeteer during an npm postbuild event.
The proper way would be to fork react-helmet and work on that, but if possible it'd be simpler to do it from the project I want to use the module with.
Can I debug a project dependency? And can I do it when using npm's postbuild hook?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
