12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- "use strict";
- const ChunkGroup = require("./ChunkGroup");
- class Entrypoint extends ChunkGroup {
-
- constructor(name) {
- super(name);
-
- this.runtimeChunk = undefined;
- }
-
- isInitial() {
- return true;
- }
-
- setRuntimeChunk(chunk) {
- this.runtimeChunk = chunk;
- }
-
- getRuntimeChunk() {
- return this.runtimeChunk || this.chunks[0];
- }
-
- replaceChunk(oldChunk, newChunk) {
- if (this.runtimeChunk === oldChunk) this.runtimeChunk = newChunk;
- return super.replaceChunk(oldChunk, newChunk);
- }
- }
- module.exports = Entrypoint;
|