feat: refactoring project
This commit is contained in:
18
node_modules/webpack/lib/HookWebpackError.js
generated
vendored
18
node_modules/webpack/lib/HookWebpackError.js
generated
vendored
@@ -55,18 +55,16 @@ module.exports.makeWebpackError = makeWebpackError;
|
||||
* @param {string} hook name of hook
|
||||
* @returns {Callback<T>} generic callback
|
||||
*/
|
||||
const makeWebpackErrorCallback = (callback, hook) => {
|
||||
return (err, result) => {
|
||||
if (err) {
|
||||
if (err instanceof WebpackError) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
callback(new HookWebpackError(err, hook));
|
||||
const makeWebpackErrorCallback = (callback, hook) => (err, result) => {
|
||||
if (err) {
|
||||
if (err instanceof WebpackError) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
callback(null, result);
|
||||
};
|
||||
callback(new HookWebpackError(err, hook));
|
||||
return;
|
||||
}
|
||||
callback(null, result);
|
||||
};
|
||||
|
||||
module.exports.makeWebpackErrorCallback = makeWebpackErrorCallback;
|
||||
|
||||
Reference in New Issue
Block a user