@@ -1305,7 +1305,7 @@ public function testItCanPrefetchEntrypoint()
13051305 $ this ->makeViteManifest ($ manifest , $ buildDir );
13061306 app ()->usePublicPath (__DIR__ );
13071307
1308- $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->usePrefetchStrategy ( ' waterfall ' )->toHtml ();
1308+ $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->prefetch (concurrency: 3 )->toHtml ();
13091309
13101310 $ expectedAssets = Js::from ([
13111311 ['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1381,7 +1381,7 @@ public function testItHandlesSpecifyingPageWithAppJs()
13811381 $ this ->makeViteManifest ($ manifest , $ buildDir );
13821382 app ()->usePublicPath (__DIR__ );
13831383
1384- $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' , 'resources/js/Pages/Auth/Login.vue ' ])->useBuildDirectory ($ buildDir )->usePrefetchStrategy ( ' waterfall ' )->toHtml ();
1384+ $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' , 'resources/js/Pages/Auth/Login.vue ' ])->useBuildDirectory ($ buildDir )->prefetch (concurrency: 3 )->toHtml ();
13851385
13861386 $ expectedAssets = Js::from ([
13871387 ['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1411,7 +1411,7 @@ public function testItCanSpecifyWaterfallChunks()
14111411 $ this ->makeViteManifest ($ manifest , $ buildDir );
14121412 app ()->usePublicPath (__DIR__ );
14131413
1414- $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->useWaterfallPrefetching (concurrency: 10 )->toHtml ();
1414+ $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->prefetch (concurrency: 10 )->toHtml ();
14151415
14161416 $ expectedAssets = Js::from ([
14171417 ['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1447,7 +1447,7 @@ public function testItCanPrefetchAggressively()
14471447 $ this ->makeViteManifest ($ manifest , $ buildDir );
14481448 app ()->usePublicPath (__DIR__ );
14491449
1450- $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->useAggressivePrefetching ()->toHtml ();
1450+ $ html = (string ) ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->prefetch ()->toHtml ();
14511451
14521452 $ expectedAssets = Js::from ([
14531453 ['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1501,7 +1501,7 @@ public function testAddsAttributesToPrefetchTags()
15011501 $ this ->makeViteManifest ($ manifest , $ buildDir );
15021502 app ()->usePublicPath (__DIR__ );
15031503
1504- $ html = (string ) tap (ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->usePrefetchStrategy ( ' waterfall ' ))->useCspNonce ('abc123 ' )->toHtml ();
1504+ $ html = (string ) tap (ViteFacade::withEntryPoints (['resources/js/app.js ' ])->useBuildDirectory ($ buildDir )->prefetch (concurrency: 3 ))->useCspNonce ('abc123 ' )->toHtml ();
15051505
15061506 $ expectedAssets = Js::from ([
15071507 ['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'nonce ' => 'abc123 ' , 'fetchpriority ' => 'low ' ],
@@ -1537,7 +1537,7 @@ public function testItNormalisesAttributes()
15371537 $ this ->makeViteManifest ($ manifest , $ buildDir );
15381538 app ()->usePublicPath (__DIR__ );
15391539
1540- $ html = (string ) tap (ViteFacade::withEntryPoints (['resources/js/app.js ' ]))->useBuildDirectory ($ buildDir )->usePrefetchStrategy ( ' waterfall ' )->usePreloadTagAttributes ([
1540+ $ html = (string ) tap (ViteFacade::withEntryPoints (['resources/js/app.js ' ]))->useBuildDirectory ($ buildDir )->prefetch (concurrency: 3 )->usePreloadTagAttributes ([
15411541 'key ' => 'value ' ,
15421542 'key-only ' ,
15431543 'true-value ' => true ,
@@ -1580,7 +1580,7 @@ public function testItPrefetchesCss()
15801580 $ this ->makeViteManifest ($ manifest , $ buildDir );
15811581 app ()->usePublicPath (__DIR__ );
15821582
1583- $ html = (string ) ViteFacade::withEntryPoints (['resources/js/admin.js ' ])->useBuildDirectory ($ buildDir )->usePrefetchStrategy ( ' waterfall ' )->toHtml ();
1583+ $ html = (string ) ViteFacade::withEntryPoints (['resources/js/admin.js ' ])->useBuildDirectory ($ buildDir )->prefetch (concurrency: 3 )->toHtml ();
15841584
15851585 $ expectedAssets = Js::from ([
15861586 ['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
0 commit comments