webpack/test/hotCases/recover/recover-after-css-loader-error/loader.js

12 lines
245 B
JavaScript
Raw Permalink Normal View History

2025-04-23 10:31:16 +08:00
/** @type {import("../../../../").LoaderDefinition} */
2025-04-23 10:06:20 +08:00
module.exports = function(content) {
const callback = this.async();
if (content.includes("Failed")) {
callback(new Error("Error in loader"));
return;
}
callback(null, content);
};