-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom value callback #44
Comments
Can you explain the use case? |
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. |
@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:
The text was updated successfully, but these errors were encountered: