Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
566 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | /*
|
---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | "use strict";
|
---|
| 6 |
|
---|
| 7 | const RuntimeGlobals = require("../RuntimeGlobals");
|
---|
| 8 | const RuntimeModule = require("../RuntimeModule");
|
---|
| 9 |
|
---|
| 10 | class ChunkNameRuntimeModule extends RuntimeModule {
|
---|
| 11 | /**
|
---|
| 12 | * @param {string} chunkName the chunk's name
|
---|
| 13 | */
|
---|
| 14 | constructor(chunkName) {
|
---|
| 15 | super("chunkName");
|
---|
| 16 | this.chunkName = chunkName;
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | /**
|
---|
| 20 | * @returns {string} runtime code
|
---|
| 21 | */
|
---|
| 22 | generate() {
|
---|
| 23 | return `${RuntimeGlobals.chunkName} = ${JSON.stringify(this.chunkName)};`;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | module.exports = ChunkNameRuntimeModule;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.