source: imaps-frontend/node_modules/webpack/lib/runtime/GetFullHashRuntimeModule.js

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: 730 bytes
RevLine 
[79a0317]1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3*/
4
5"use strict";
6
7const RuntimeGlobals = require("../RuntimeGlobals");
8const RuntimeModule = require("../RuntimeModule");
9
10/** @typedef {import("../Compilation")} Compilation */
11
12class GetFullHashRuntimeModule extends RuntimeModule {
13 constructor() {
14 super("getFullHash");
15 this.fullHash = true;
16 }
17
18 /**
19 * @returns {string | null} runtime code
20 */
21 generate() {
22 const compilation = /** @type {Compilation} */ (this.compilation);
23 const { runtimeTemplate } = compilation;
24 return `${RuntimeGlobals.getFullHash} = ${runtimeTemplate.returningFunction(
25 JSON.stringify(compilation.hash || "XXXX")
26 )}`;
27 }
28}
29
30module.exports = GetFullHashRuntimeModule;
Note: See TracBrowser for help on using the repository browser.