IMPR: no need to defer CSS

This commit is contained in:
Tony Air 2021-08-08 21:58:45 +02:00
parent d90da8e66f
commit aca235032e

View File

@ -134,8 +134,9 @@ class DeferredRequirements implements TemplateGlobalProvider
public static function loadCSS($css): void
{
//$external = (mb_strpos($css, '//') === 0 || mb_strpos($css, 'http') === 0);
if (self::getDeferred() && !self::webpackActive()) {
$external = (mb_strpos($css, '//') === 0 || mb_strpos($css, 'http') === 0);
//if (self::getDeferred() && !self::webpackActive()) {
if ($external) {
self::$css[] = $css;
} else {
WebpackTemplateProvider::loadCSS($css);