• File: ChunkNameRuntimeModule.js
  • Full Path: /var/www/paytek-africa.com/node_modules/webpack/lib/runtime/ChunkNameRuntimeModule.js
  • Date Modified: 07/19/2022 5:05 PM
  • File size: 566 bytes
  • MIME-type: text/plain
  • Charset: utf-8
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
*/

"use strict";

const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");

class ChunkNameRuntimeModule extends RuntimeModule {
	/**
	 * @param {string} chunkName the chunk's name
	 */
	constructor(chunkName) {
		super("chunkName");
		this.chunkName = chunkName;
	}

	/**
	 * @returns {string} runtime code
	 */
	generate() {
		return `${RuntimeGlobals.chunkName} = ${JSON.stringify(this.chunkName)};`;
	}
}

module.exports = ChunkNameRuntimeModule;