From 773a0f69b6561d0295fe907cc5bc42429e55fae7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 27 Jul 2021 14:44:15 +0200 Subject: [PATCH] Generate preload manifest when testing style --- .../files/lib/system/style/StyleCompiler.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index f4d849863d..6ccc5c7d10 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -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; } -- 2.20.1