diff --git a/app/Core/Assets/CascadingStyleSheets.php b/app/Core/Assets/CascadingStyleSheets.php
index b20d36b..5505b43 100644
--- a/app/Core/Assets/CascadingStyleSheets.php
+++ b/app/Core/Assets/CascadingStyleSheets.php
@@ -13,10 +13,11 @@ public function renderHtml()
echo HookManager::applyFilters(
'print_css_html',
sprintf(
- '',
+ '',
HookManager::applyFilters("asset_css_url", $this->getUrl(
Env::get("COMPRESSED_ASSETS", Env::get("DEBUG") === false)
- ), $this->id, $this)
+ ), $this->id, $this),
+ $this->id
),
$this->getId(),
$this
diff --git a/app/Core/Assets/JavaScript.php b/app/Core/Assets/JavaScript.php
index 1ce00f4..8848b84 100644
--- a/app/Core/Assets/JavaScript.php
+++ b/app/Core/Assets/JavaScript.php
@@ -17,10 +17,11 @@ public function renderHtml()
echo HookManager::applyFilters(
'print_js_html',
sprintf(
- '',
+ '',
HookManager::applyFilters("asset_js_url", $this->getUrl(
Env::get("COMPRESSED_ASSETS", Env::get("DEBUG") === false)
- ), $this->id, $this)
+ ), $this->id, $this),
+ $this->id
),
$this->getId(),
$this
diff --git a/app/Core/ExternalAsset.php b/app/Core/ExternalAsset.php
index 83997f9..e0ca216 100644
--- a/app/Core/ExternalAsset.php
+++ b/app/Core/ExternalAsset.php
@@ -16,12 +16,16 @@ public function setUrl(AssetUrl $url): self
return $this;
}
- public function getUrl($supportMinUrl = false)
+ public function getUrl($supportMinUrl = null)
{
if (empty($this->url)) {
return "";
}
+ if (is_null($supportMinUrl)) {
+ $supportMinUrl = Env::get('COMPRESSED_ASSETS', !Env::get('DEBUG', false));
+ }
+
return $this->url->getUrl($supportMinUrl);
}
}
diff --git a/app/bootstrap.php b/app/bootstrap.php
index 5820c2d..859f87c 100644
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -158,8 +158,8 @@ protected function setup()
protected function initAssets()
{
AssetManager::registerAsset(
- 'common-css',
- new AssetUrl('/extensions/common/assets/css/common.css'),
+ 'common',
+ new AssetUrl('/extensions/common/assets/css/common.css', '/extensions/common/assets/css/common.min.css'),
AssetTypeEnum::CSS(),
[],
'1.0.0',