Generate preload manifest when testing style
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 27 Jul 2021 12:44:15 +0000 (14:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 27 Jul 2021 12:44:15 +0000 (14:44 +0200)
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php

index f4d849863da847c9e71770d731fe6b72f475d561..6ccc5c7d107f836e4e23c4a2022fb23f30a258dd 100644 (file)
@@ -192,7 +192,15 @@ final class StyleCompiler extends SingletonFactory
                 $variables
             );
 
-            $this->writeCss(FileUtil::addTrailingSlash($testFileDir) . 'style', $css);
+            $preloadManifest = $this->buildPreloadManifest(
+                $this->extractPreloadRequests($css)
+            );
+
+            $this->writeCss(
+                FileUtil::addTrailingSlash($testFileDir) . 'style',
+                $css,
+                $preloadManifest
+            );
         } catch (\Exception $e) {
             return $e;
         }