2025-05-01 22:36:51 +08:00
|
|
|
/** @type {import("../../../../").LoaderDefinition} */
|
2021-04-23 03:45:45 +08:00
|
|
|
exports.default = function (source) {
|
2021-02-06 08:04:42 +08:00
|
|
|
const callback = this.async();
|
|
|
|
|
const ref = JSON.parse(source);
|
|
|
|
|
this.loadModule("./error-loader!" + ref, (err, source, sourceMap, module) => {
|
|
|
|
|
if (err) {
|
|
|
|
|
callback(err);
|
|
|
|
|
} else {
|
2025-05-01 22:36:51 +08:00
|
|
|
callback(null, JSON.stringify(`source: ${JSON.parse(/** @type {string} */ (source))}`));
|
2021-02-06 08:04:42 +08:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|