/
Mikhail823
/
todo
Обзор
Документация
Войти
/
Mikhail823
/
todo
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/webpack-dev-middleware/dist/utils/ready.js
26 строк
703 B
Mikhail Popov
j
23 фев 2026, 16:12
23 фев 2026, 16:12
ff7232a
Код
Авторство
О чём код?
"use strict"; /** @typedef {import("../index.js").IncomingMessage} IncomingMessage */ /** @typedef {import("../index.js").ServerResponse} ServerResponse */ /** * @template {IncomingMessage} Request * @template {ServerResponse} Response * @param {import("../index.js").Context<Request, Response>} context * @param {(...args: any[]) => any} callback * @param {Request} [req] * @returns {void} */ function ready(context, callback, req) { if (context.state) { callback(context.stats); return; } const name = req && req.url || callback.name; context.logger.info(`wait until bundle finished${name ? `: ${name}` : ""}`); context.callbacks.push(callback); } module.exports = ready;