plasticine / inject-loader

💉📦 A Webpack loader for injecting code into modules via their dependencies.
https://www.npmjs.com/package/inject-loader
MIT License
482 stars 47 forks source link

Add source path to failed injection error #49

Closed TeaSeaLancs closed 6 years ago

TeaSeaLancs commented 6 years ago

While developing tests using the inject-loader, if the injection failed because the module’s requested modules had changed, it was very difficult to track down which file has the error mainly due to the webpack stack trace being useless in our case.

This just updates the error message a bit to include the file which you were trying to use with inject-loader that failed.