diff --git a/src/Templates/DeferredRequirements.php b/src/Templates/DeferredRequirements.php index 9365e60..f3139b5 100755 --- a/src/Templates/DeferredRequirements.php +++ b/src/Templates/DeferredRequirements.php @@ -81,20 +81,6 @@ class DeferredRequirements implements TemplateGlobalProvider } } - // App libs - if (!$config['nofontawesome']) { - $v = !isset($config['fontawesome_version']) || !$config['fontawesome_version'] - ? Config::inst()->get(FontAwesomeField::class, 'version') - : $config['fontawesome_version']; - - if ($config['fontawesome_svg']) { - Requirements::customScript('FontAwesomeConfig={searchPseudoElements:true}'); - self::loadJS('//use.fontawesome.com/releases/v'.$v.'/js/all.js'); - } else { - self::loadCSS('//use.fontawesome.com/releases/v'.$v.'/css/all.css'); - } - } - self::loadCSS($mainTheme.'.css'); // hot reloading @@ -136,6 +122,20 @@ class DeferredRequirements implements TemplateGlobalProvider self::loadJS($projectName.'_'.$curr_class . '.js'); } + // App libs + if (!$config['nofontawesome']) { + $v = !isset($config['fontawesome_version']) || !$config['fontawesome_version'] + ? Config::inst()->get(FontAwesomeField::class, 'version') + : $config['fontawesome_version']; + + if ($config['fontawesome_svg']) { + Requirements::customScript('FontAwesomeConfig={searchPseudoElements:true}'); + self::loadJS('//use.fontawesome.com/releases/v'.$v.'/js/all.js'); + } else { + self::loadCSS('//use.fontawesome.com/releases/v'.$v.'/css/all.css'); + } + } + return self::forTemplate(); }