Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion tasks/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
return;
}

const compilerClosePromises = [];

targets.forEach((target) => {
if (target === "options") {
runningTargetCount--;
Expand Down Expand Up @@ -97,7 +99,16 @@

keepalive = keepalive || opts.keepalive;

if (--runningTargetCount === 0 && !keepalive) done();
if (!keepalive) {
compilerClosePromises.push(new Promise((resolve, reject) =>

Check failure on line 103 in tasks/webpack.js

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎················`
compiler.close((err) => err ? reject(err) : resolve())

Check warning on line 104 in tasks/webpack.js

View workflow job for this annotation

GitHub Actions / Lint

'err' is already declared in the upper scope on line 66 column 28

Check failure on line 104 in tasks/webpack.js

View workflow job for this annotation

GitHub Actions / Lint

Replace `compiler.close((err)·=>·err·?·reject(err)·:·resolve())` with `··compiler.close((err)·=>·(err·?·reject(err)·:·resolve())),`
));

Check failure on line 105 in tasks/webpack.js

View workflow job for this annotation

GitHub Actions / Lint

Replace `··············)` with `················),⏎··············`
if (--runningTargetCount === 0) {
Promise.all(compilerClosePromises)
.then(() => done())
.catch((err) => done(err));

Check warning on line 109 in tasks/webpack.js

View workflow job for this annotation

GitHub Actions / Lint

'err' is already declared in the upper scope on line 66 column 28
}
}
};

if (opts.watch) {
Expand Down
Loading