Closed devpreview closed 6 years ago
Can you explain the use case? When is the function called and what is passed to it?
I think it would be useful for things like tracking the resources which load failed.
new ScriptExtHtmlWebpackPlugin({
custom: [
{
test: /\.js$/,
attribute: 'onerror',
value: e => { // track the resource }
}
]
}),
Sorry - still not clear on when the function wuld be called and hat data would be passed. Happy to re-open if more clarity available - or better a spike-PR! :-)
@numical I need this too. For example, When the resource requested fails, and the error event is reported to the log.The callback parameter is the filename. Like this
new ScriptExtHtmlWebpackPlugin({
custom: [
{
test: /\.js$/,
attribute: 'onerror',
value: filename => report(filename)
}
]
}),
For example: