webpack/test/cases/errors/loader-error-warning/error-loader.js

7 lines
257 B
JavaScript

/** @type {import("../../../../").LoaderDefinition<string>} */
module.exports = function (source) {
//@ts-expect-error errors must be Errors, string is not recommended and should lead to type error
this.emitError(this.query.substr(1));
return source;
};