Skip to content

Commit

Permalink
refactor: remove extra 'closeWatchers' from compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jleverenz committed Feb 8, 2023
1 parent 02fbce3 commit 36df275
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion actions/build.action.ts
Expand Up @@ -129,7 +129,6 @@ export class BuildAction extends AbstractAction {
appName,
isDebugEnabled,
watchMode,
this.assetsManager,
onSuccess,
);

Expand Down
5 changes: 1 addition & 4 deletions lib/compiler/webpack-compiler.ts
Expand Up @@ -29,7 +29,6 @@ export class WebpackCompiler {
appName: string,
isDebugEnabled = false,
watchMode = false,
assetsManager: AssetsManager,
onSuccess?: () => void,
) {
const cwd = process.cwd();
Expand Down Expand Up @@ -130,9 +129,7 @@ export class WebpackCompiler {
assets: false,
});
if (!err && !stats!.hasErrors()) {
if (!onSuccess) {
assetsManager.closeWatchers();
} else {
if (onSuccess) {
onSuccess();
}
} else if (!watchMode && !watch) {
Expand Down

0 comments on commit 36df275

Please sign in to comment.