Skip to content

Commit

Permalink
Fix Mix webpack config not being cleaned (#1175)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxwilko committed Jul 30, 2024
1 parent 5198a5c commit f0eeee8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/system/console/asset/mix/MixCompile.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ protected function beforeExecution(string $configPath): void
*/
protected function afterExecution(string $configPath): void
{
$webpackJsPath = $this->getPackagePath($configPath);
if (File::exists($webpackJsPath)) {
File::delete($webpackJsPath);
$webpackConfigPath = $this->getJsConfigPath($configPath);
if (File::exists($webpackConfigPath) && File::isFile($webpackConfigPath)) {
File::delete($webpackConfigPath);
}
}
}
2 changes: 1 addition & 1 deletion modules/system/console/asset/mix/MixWatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function createCommand(string $configPath): array
public function handleCleanup(): void
{
$this->newLine();
$this->info('Cleaning up: ' . $this->getPackagePath(base_path($this->watchingFilePath)));
$this->info('Cleaning up: ' . $this->getPackagePath($this->watchingFilePath));
$this->afterExecution(base_path($this->watchingFilePath));
}
}

0 comments on commit f0eeee8

Please sign in to comment.