main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[79a0317] | 1 | /*
|
---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
| 3 | Author Tobias Koppers @sokra
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | "use strict";
|
---|
| 7 |
|
---|
| 8 | const RuntimeGlobals = require("../RuntimeGlobals");
|
---|
| 9 | const RuntimeModule = require("../RuntimeModule");
|
---|
| 10 | const Template = require("../Template");
|
---|
| 11 |
|
---|
| 12 | class HotModuleReplacementRuntimeModule extends RuntimeModule {
|
---|
| 13 | constructor() {
|
---|
| 14 | super("hot module replacement", RuntimeModule.STAGE_BASIC);
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | /**
|
---|
| 18 | * @returns {string | null} runtime code
|
---|
| 19 | */
|
---|
| 20 | generate() {
|
---|
| 21 | return Template.getFunctionContent(
|
---|
| 22 | require("./HotModuleReplacement.runtime.js")
|
---|
| 23 | )
|
---|
| 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 |
|
---|
| 42 | module.exports = HotModuleReplacementRuntimeModule;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.