Skip to content

Commit e9304b0

Browse files
authored
Merge pull request #755 from inertiajs/ssr-config-key-rename
[2.x] Refactored `ssr.dispatch_without_bundle` to `ssr.ensure_bundle_exists`
2 parents c1639e9 + 4e362ad commit e9304b0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

config/inertia.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
'url' => env('INERTIA_SSR_URL', 'http://127.0.0.1:13714'),
2727

28-
'dispatch_without_bundle' => (bool) env('INERTIA_SSR_DISPATCH_WITHOUT_BUNDLE', false),
28+
'ensure_bundle_exists' => (bool) env('INERTIA_SSR_ENSURE_BUNDLE_EXISTS', true),
2929

3030
// 'bundle' => base_path('bootstrap/ssr/ssr.mjs'),
3131

src/Ssr/HttpGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function isHealthy(): bool
6767
*/
6868
protected function shouldDispatchWithoutBundle(): bool
6969
{
70-
return config('inertia.ssr.dispatch_without_bundle', false);
70+
return ! config('inertia.ssr.ensure_bundle_exists', true);
7171
}
7272

7373
/**

tests/HttpGatewayTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ public function test_it_uses_the_configured_http_url_when_the_bundle_file_is_det
6363
$this->assertEquals('<div id="app">SSR Response</div>', $response->body);
6464
}
6565

66-
public function test_it_uses_the_configured_http_url__when_bundle_file_detection_is_disabled()
66+
public function test_it_uses_the_configured_http_url_when_bundle_file_detection_is_disabled()
6767
{
6868
config([
6969
'inertia.ssr.enabled' => true,
70-
'inertia.ssr.dispatch_without_bundle' => true,
70+
'inertia.ssr.ensure_bundle_exists' => false,
7171
'inertia.ssr.bundle' => null,
7272
]);
7373

0 commit comments

Comments
 (0)