/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/library/render-order-issue/loader.js
22 строки
546 B
Xiao
fix: keep renderModule order consistent (#19867)
05 сен 2025, 12:31
Не верифицирован
05 сен 2025, 12:31
57a8ebd
Код
Авторство
О чём код?
"use strict"; /** @typedef {import("../../../../types").LoaderDefinition} LoaderDefinition */ /** * @type {LoaderDefinition} */ module.exports = function loader(code) { const request = this.resourcePath; const callback = this.async(); // You can simulate an unstable async operation by switching the waiting module // uncomment this 👇 and run again // if (request.includes("entry1")) { if (request.includes("entry2")) { setTimeout(() => { callback(null, code); }, 2000); } else { callback(null, code); } };