Skip to content

Commit a27fe7f

Browse files
author
evilebottnawi
committed
refactor: use async done for webpack@4
1 parent 0f8027c commit a27fe7f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,19 @@ class ChildProcessWebpackPlugin {
152152
}
153153

154154
if (this.options.onBuildExit.length > 0) {
155-
const doneFn = () => {
155+
const doneFn = (stats, callback) => {
156156
this.execute(this.options.onBuildExit);
157157

158158
if (this.options.dev) {
159159
this.options.onBuildExit = [];
160160
}
161+
162+
callback();
161163
};
162164

163165
if (compiler.hooks) {
164166
// Information: `asyncTap` in future major
165-
compiler.hooks.done.tap(plugin, doneFn);
167+
compiler.hooks.done.tapAsync(plugin, doneFn);
166168
} else {
167169
compiler.plugin("done", doneFn);
168170
}

0 commit comments

Comments
 (0)