/
moreqqq
/
DeliveryService
Обзор
Документация
Войти
/
moreqqq
/
DeliveryService
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
server/node_modules/webpack/lib/hmr/JavascriptHotModuleReplacementHelper.js
37 строк
1 KB
moreqqq
написал тесты
29 май 2026, 22:13
29 май 2026, 22:13
6f740ff
Код
Авторство
О чём код?
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Haijie Xie @hai-x */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); /** * @param {string} type unique identifier used for HMR runtime properties * @returns {string} HMR runtime code */ const generateJavascriptHMR = (type) => Template.getFunctionContent( require("../hmr/JavascriptHotModuleReplacement.runtime") ) .replace(/\$key\$/g, type) .replace(/\$installedChunks\$/g, "installedChunks") .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) .replace(/\$ensureChunkHandlers\$/g, RuntimeGlobals.ensureChunkHandlers) .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) .replace( /\$hmrDownloadUpdateHandlers\$/g, RuntimeGlobals.hmrDownloadUpdateHandlers ) .replace( /\$hmrInvalidateModuleHandlers\$/g, RuntimeGlobals.hmrInvalidateModuleHandlers ); module.exports.generateJavascriptHMR = generateJavascriptHMR;