source: trip-planner-front/node_modules/webpack/lib/hmr/HotModuleReplacementRuntimeModule.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8const RuntimeGlobals = require("../RuntimeGlobals");
9const RuntimeModule = require("../RuntimeModule");
10const Template = require("../Template");
11
12class HotModuleReplacementRuntimeModule extends RuntimeModule {
13 constructor() {
14 super("hot module replacement", RuntimeModule.STAGE_BASIC);
15 }
16 /**
17 * @returns {string} runtime code
18 */
19 generate() {
20 return Template.getFunctionContent(
21 require("./HotModuleReplacement.runtime.js")
22 )
23 .replace(/\$getFullHash\$/g, RuntimeGlobals.getFullHash)
24 .replace(
25 /\$interceptModuleExecution\$/g,
26 RuntimeGlobals.interceptModuleExecution
27 )
28 .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache)
29 .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData)
30 .replace(/\$hmrDownloadManifest\$/g, RuntimeGlobals.hmrDownloadManifest)
31 .replace(
32 /\$hmrInvalidateModuleHandlers\$/g,
33 RuntimeGlobals.hmrInvalidateModuleHandlers
34 )
35 .replace(
36 /\$hmrDownloadUpdateHandlers\$/g,
37 RuntimeGlobals.hmrDownloadUpdateHandlers
38 );
39 }
40}
41
42module.exports = HotModuleReplacementRuntimeModule;
Note: See TracBrowser for help on using the repository browser.