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

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

Fix frontend appearance

  • Property mode set to 100644
File size: 807 bytes
Line 
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 /** @type {boolean} */
16 this.fullHash = true;
17 }
18
19 /**
20 * Generates runtime code for this runtime module.
21 * @returns {string | null} runtime code
22 */
23 generate() {
24 const compilation = /** @type {Compilation} */ (this.compilation);
25 const { runtimeTemplate } = compilation;
26 return `${RuntimeGlobals.getFullHash} = ${runtimeTemplate.returningFunction(
27 JSON.stringify(compilation.hash || "XXXX")
28 )}`;
29 }
30}
31
32module.exports = GetFullHashRuntimeModule;
Note: See TracBrowser for help on using the repository browser.