source: frontend/node_modules/webpack/lib/hmr/HotModuleReplacementRuntimeModule.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • 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 /**
18 * Generates runtime code for this runtime module.
19 * @returns {string | null} runtime code
20 */
21 generate() {
22 return Template.getFunctionContent(
23 require("./HotModuleReplacement.runtime")
24 )
25 .replace(
26 /\$interceptModuleExecution\$/g,
27 RuntimeGlobals.interceptModuleExecution
28 )
29 .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache)
30 .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData)
31 .replace(/\$hmrDownloadManifest\$/g, RuntimeGlobals.hmrDownloadManifest)
32 .replace(
33 /\$hmrInvalidateModuleHandlers\$/g,
34 RuntimeGlobals.hmrInvalidateModuleHandlers
35 )
36 .replace(
37 /\$hmrDownloadUpdateHandlers\$/g,
38 RuntimeGlobals.hmrDownloadUpdateHandlers
39 );
40 }
41}
42
43module.exports = HotModuleReplacementRuntimeModule;
Note: See TracBrowser for help on using the repository browser.