/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/cases/errors/import-module-cycle/loader.js
12 строк
379 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 ref = JSON.parse(source); const callback = this.async(); this.importModule("../loader!" + ref, {}, (err, exports) => { if (err) { callback(null, JSON.stringify(`err: ${err && err.message}`)); } else { callback(null, JSON.stringify(`source: ${exports}`)); } }); };