add a separate class for HotUpdateChunk

This commit is contained in:
Tobias Koppers 2018-04-12 11:04:49 +02:00
parent a4e8c07f09
commit 3677e25c30
2 changed files with 18 additions and 2 deletions

16
lib/HotUpdateChunk.js Normal file
View File

@ -0,0 +1,16 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Chunk = require("./Chunk");
class HotUpdateChunk extends Chunk {
constructor() {
super();
this.removedModules = undefined;
}
}
module.exports = HotUpdateChunk;

View File

@ -5,7 +5,7 @@
"use strict";
const Template = require("./Template");
const Chunk = require("./Chunk");
const HotUpdateChunk = require("./HotUpdateChunk");
const { Tapable, SyncWaterfallHook, SyncHook } = require("tapable");
module.exports = class HotUpdateChunkTemplate extends Tapable {
@ -41,7 +41,7 @@ module.exports = class HotUpdateChunkTemplate extends Tapable {
moduleTemplate,
dependencyTemplates
) {
const hotUpdateChunk = new Chunk();
const hotUpdateChunk = new HotUpdateChunk();
hotUpdateChunk.id = id;
hotUpdateChunk.setModules(modules);
hotUpdateChunk.removedModules = removedModules;