路泰科技体检小程序UI设计新版本
1
wwl
2025-07-30 61b58bd03d04d2eb50ac2d93a188c819fe67e01e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
    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;