webpack/lib/Entrypoint.js

29 lines
466 B
JavaScript
Raw Normal View History

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ChunkGroup = require("./ChunkGroup");
class Entrypoint extends ChunkGroup {
constructor(name) {
super(name);
this.runtimeChunk = undefined;
}
isInitial() {
return true;
2018-01-09 16:40:30 +08:00
}
setRuntimeChunk(chunk) {
this.runtimeChunk = chunk;
}
getRuntimeChunk() {
return this.runtimeChunk || this.chunks[0];
}
}
module.exports = Entrypoint;