makeWebpackErrorCallback = (callback, hook) => (err, result) => {
	if (err) {
		if (err instanceof WebpackError) {
			callback(err);
			return;
		}
		callback(new HookWebpackError(err, hook));
		return;
	}
	callback(null, result);
}
@template T
@param {(err: WebpackError | null, result?: T) => void} callback webpack error callback
@param {string} hook name of hook
@returns {Callback<T>} generic callback