Closed broksonic21 closed 6 months ago
Yes, that makes sense! Would love to see your PR :)
@mondaychen - feel free to propose alternate names or suggestions, but here you go: https://github.com/mondaychen/devtools-ignore-webpack-plugin/pull/5
Would love to get this in, thanks!
Plugin works great for a number of our projects - thanks @mondaychen!
One issue on a project we have:
Right now, the plugin looks for all assets with a
.map
extension:https://github.com/mondaychen/devtools-ignore-webpack-plugin/blob/main/src/index.ts#L61-L63
It then loads it as JSON:
https://github.com/mondaychen/devtools-ignore-webpack-plugin/blob/main/src/index.ts#L71
However, that fails/errors if you have a .map file that isn't a sourcemap (or not in JSON) - as the JSON can fail to process
This can give an error like:
In our case, we'd prefer this plugin looks for
.js.map
to avoid this issue, but alternatively, would love an option to pass in the extension to look for. Thinking something likestatus_map_extension
which defaults to.map
but could be overridden (in our case, to.js.map
but others might have different needs). Bonus points if it accepts an array.I'm happy to key up a PR, would that be okay?