Skip to content

Commit

Permalink
Drop asset minification feature to fix JS issue with admin not able t…
Browse files Browse the repository at this point in the history
…o login and unable to edit mail templates. #970 #948

Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed May 20, 2022
1 parent be92fda commit b9df4df
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions app/system/traits/CombinesAssets.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ trait CombinesAssets
*/
public $useCache = false;

/**
* @var bool Compress (minify) asset files.
*/
public $useMinify = false;

protected $assetsCombinerUri;

protected $combineAssets;
Expand All @@ -56,28 +51,19 @@ protected function initCombiner()
{
$this->cacheKeyPrefix = 'ti.combiner.';
$this->useCache = config('system.enableAssetCache', true);
$this->useMinify = config('system.enableAssetMinify', null);
$this->combineAssets = config('system.enableAssetCombiner', !config('app.debug', false));
$this->storagePath = storage_path('system/combiner/data');
$this->assetsCombinerUri = config('system.assetsCombinerUri', '/_assets');

if (app()->runningInAdmin())
$this->assetsCombinerUri = config('system.adminUri', '/admin').$this->assetsCombinerUri;

if ($this->useMinify === null)
$this->useMinify = !config('app.debug', false);

$this->registerFilter('css', new \Igniter\Flame\Assetic\Filter\CssImportFilter);
$this->registerFilter(['css', 'scss'], new \Igniter\Flame\Assetic\Filter\CssRewriteFilter);

$scssPhpFilter = new \Igniter\Flame\Assetic\Filter\ScssphpFilter;
$scssPhpFilter->addImportPath(base_path());
$this->registerFilter('scss', $scssPhpFilter);

if ($this->useMinify) {
$this->registerFilter('js', new \Igniter\Flame\Assetic\Filter\JSMinFilter);
$this->registerFilter(['css', 'scss'], new \Igniter\Flame\Assetic\Filter\StylesheetMinify);
}
}

/**
Expand Down

0 comments on commit b9df4df

Please sign in to comment.