Skip to content
Merged
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
Runtime: Restrict minifying to *.php files
  • Loading branch information
yannoff committed Mar 13, 2024
commit 446f9ee87d922d0abb8856f68c0816ea5d8d894c
7 changes: 6 additions & 1 deletion src/Command/Compile.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ protected function addFile(string $file)
$fullpath = $this->fullpath($file);

$this->info('+ ' . $file, 'grey');
$this->builder->addFile($fullpath, $file);

// Only minify pure PHP source files, other files such as
// code templates for instance, should be left as-is
$minify = (pathinfo($file, PATHINFO_EXTENSION) === 'php');

$this->builder->addFile($fullpath, $file, $minify);
}

/**
Expand Down