From 7d93e00ffc1de2183643f342010087916908a6a1 Mon Sep 17 00:00:00 2001 From: Jeremiasz Major Date: Mon, 14 Oct 2024 12:17:07 +0200 Subject: [PATCH] fix condition --- src/Ssr/HttpGateway.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ssr/HttpGateway.php b/src/Ssr/HttpGateway.php index 89560e66..b144eb69 100644 --- a/src/Ssr/HttpGateway.php +++ b/src/Ssr/HttpGateway.php @@ -19,8 +19,10 @@ public function __construct( public function dispatch(array $page): ?Response { if ($this->vite->isRunningHot()) { + // todo: maybe ask laravel to make Vite::hotAsset() public + // $url = $this->vite->hotAsset('render'); $url = file_get_contents($this->vite->hotFile()).'/render'; - } elseif (config('inertia.ssr.enabled', true) || (new BundleDetector)->detect()) { + } elseif (config('inertia.ssr.enabled', true) && (new BundleDetector)->detect()) { $url = str_replace('/render', '', config('inertia.ssr.url', 'http://127.0.0.1:13714')).'/render'; } else { return null;