feat: refactoring project
This commit is contained in:
23
node_modules/webpack/lib/ErrorHelpers.js
generated
vendored
23
node_modules/webpack/lib/ErrorHelpers.js
generated
vendored
@@ -48,9 +48,9 @@ const cutOffMultilineMessage = (stack, message) => {
|
||||
/** @type {string[]} */
|
||||
const result = [];
|
||||
|
||||
stackSplitByLines.forEach((line, idx) => {
|
||||
for (const [idx, line] of stackSplitByLines.entries()) {
|
||||
if (!line.includes(messageSplitByLines[idx])) result.push(line);
|
||||
});
|
||||
}
|
||||
|
||||
return result.join("\n");
|
||||
};
|
||||
@@ -64,10 +64,9 @@ const cutOffMessage = (stack, message) => {
|
||||
const nextLine = stack.indexOf("\n");
|
||||
if (nextLine === -1) {
|
||||
return stack === message ? "" : stack;
|
||||
} else {
|
||||
const firstLine = stack.slice(0, nextLine);
|
||||
return firstLine === message ? stack.slice(nextLine + 1) : stack;
|
||||
}
|
||||
const firstLine = stack.slice(0, nextLine);
|
||||
return firstLine === message ? stack.slice(nextLine + 1) : stack;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -92,10 +91,10 @@ const cleanUpWebpackOptions = (stack, message) => {
|
||||
return stack;
|
||||
};
|
||||
|
||||
exports.cutOffByFlag = cutOffByFlag;
|
||||
exports.cutOffLoaderExecution = cutOffLoaderExecution;
|
||||
exports.cutOffWebpackOptions = cutOffWebpackOptions;
|
||||
exports.cutOffMultilineMessage = cutOffMultilineMessage;
|
||||
exports.cutOffMessage = cutOffMessage;
|
||||
exports.cleanUp = cleanUp;
|
||||
exports.cleanUpWebpackOptions = cleanUpWebpackOptions;
|
||||
module.exports.cutOffByFlag = cutOffByFlag;
|
||||
module.exports.cutOffLoaderExecution = cutOffLoaderExecution;
|
||||
module.exports.cutOffWebpackOptions = cutOffWebpackOptions;
|
||||
module.exports.cutOffMultilineMessage = cutOffMultilineMessage;
|
||||
module.exports.cutOffMessage = cutOffMessage;
|
||||
module.exports.cleanUp = cleanUp;
|
||||
module.exports.cleanUpWebpackOptions = cleanUpWebpackOptions;
|
||||
|
||||
Reference in New Issue
Block a user