/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/cases/errors/load-module-error/loader.js
12 строк
384 B
Alexander Akait
fix: a lot of types (#19486)
01 май 2025, 17:36
Не верифицирован
01 май 2025, 17:36
bc25829
Код
Авторство
О чём код?
/** @type {import("../../../../").LoaderDefinition} */ exports.default = function (source) { const callback = this.async(); const ref = JSON.parse(source); this.loadModule("./error-loader!" + ref, (err, source, sourceMap, module) => { if (err) { callback(err); } else { callback(null, JSON.stringify(`source: ${JSON.parse(/** @type {string} */ (source))}`)); } }); };