Skip to content

Commit 7b473f4

Browse files
committed
removed eager loading as it landed in vite main
1 parent e00319c commit 7b473f4

File tree

4 files changed

+3
-669
lines changed

4 files changed

+3
-669
lines changed

config/inertia.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@
6464

6565
],
6666

67-
'eager_prefetch' => [
68-
69-
'strategy' => null,
70-
71-
'chunks' => 3,
72-
73-
],
74-
7567
'history' => [
7668

7769
'encrypt' => false,

src/ServiceProvider.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function register(): void
2424
$this->app->bind(Gateway::class, HttpGateway::class);
2525

2626
$this->mergeConfigFrom(
27-
__DIR__.'/../config/inertia.php',
27+
__DIR__ . '/../config/inertia.php',
2828
'inertia'
2929
);
3030

@@ -40,21 +40,14 @@ public function register(): void
4040
$app['config']->get('inertia.testing.page_extensions')
4141
);
4242
});
43-
44-
if (config('inertia.eager_prefetch.strategy', false)) {
45-
$this->app->singleton(Vite::class, fn () => (new ViteEagerPrefetch())->usePrefetchStrategy(
46-
config('inertia.eager_prefetch.strategy'),
47-
config('inertia.eager_prefetch.chunks')
48-
));
49-
}
5043
}
5144

5245
public function boot(): void
5346
{
5447
$this->registerConsoleCommands();
5548

5649
$this->publishes([
57-
__DIR__.'/../config/inertia.php' => config_path('inertia.php'),
50+
__DIR__ . '/../config/inertia.php' => config_path('inertia.php'),
5851
]);
5952
}
6053

@@ -89,7 +82,7 @@ protected function registerRequestMacro(): void
8982
protected function registerRouterMacro(): void
9083
{
9184
Router::macro('inertia', function ($uri, $component, $props = []) {
92-
return $this->match(['GET', 'HEAD'], $uri, '\\'.Controller::class)
85+
return $this->match(['GET', 'HEAD'], $uri, '\\' . Controller::class)
9386
->defaults('component', $component)
9487
->defaults('props', $props);
9588
});

0 commit comments

Comments
 (0)