@@ -1305,7 +1305,7 @@ public function testItCanPrefetchEntrypoint()
1305
1305
$ this ->makeViteManifest ($ manifest , $ buildDir );
1306
1306
app ()->usePublicPath (__DIR__ );
1307
1307
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 ();
1309
1309
1310
1310
$ expectedAssets = Js::from ([
1311
1311
['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1381,7 +1381,7 @@ public function testItHandlesSpecifyingPageWithAppJs()
1381
1381
$ this ->makeViteManifest ($ manifest , $ buildDir );
1382
1382
app ()->usePublicPath (__DIR__ );
1383
1383
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 ();
1385
1385
1386
1386
$ expectedAssets = Js::from ([
1387
1387
['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1411,7 +1411,7 @@ public function testItCanSpecifyWaterfallChunks()
1411
1411
$ this ->makeViteManifest ($ manifest , $ buildDir );
1412
1412
app ()->usePublicPath (__DIR__ );
1413
1413
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 ();
1415
1415
1416
1416
$ expectedAssets = Js::from ([
1417
1417
['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1447,7 +1447,7 @@ public function testItCanPrefetchAggressively()
1447
1447
$ this ->makeViteManifest ($ manifest , $ buildDir );
1448
1448
app ()->usePublicPath (__DIR__ );
1449
1449
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 ();
1451
1451
1452
1452
$ expectedAssets = Js::from ([
1453
1453
['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
@@ -1501,7 +1501,7 @@ public function testAddsAttributesToPrefetchTags()
1501
1501
$ this ->makeViteManifest ($ manifest , $ buildDir );
1502
1502
app ()->usePublicPath (__DIR__ );
1503
1503
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 ();
1505
1505
1506
1506
$ expectedAssets = Js::from ([
1507
1507
['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'nonce ' => 'abc123 ' , 'fetchpriority ' => 'low ' ],
@@ -1537,7 +1537,7 @@ public function testItNormalisesAttributes()
1537
1537
$ this ->makeViteManifest ($ manifest , $ buildDir );
1538
1538
app ()->usePublicPath (__DIR__ );
1539
1539
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 ([
1541
1541
'key ' => 'value ' ,
1542
1542
'key-only ' ,
1543
1543
'true-value ' => true ,
@@ -1580,7 +1580,7 @@ public function testItPrefetchesCss()
1580
1580
$ this ->makeViteManifest ($ manifest , $ buildDir );
1581
1581
app ()->usePublicPath (__DIR__ );
1582
1582
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 ();
1584
1584
1585
1585
$ expectedAssets = Js::from ([
1586
1586
['rel ' => 'prefetch ' , 'href ' => "https://example.com/ {$ buildDir }/assets/ConfirmPassword-CDwcgU8E.js " , 'fetchpriority ' => 'low ' ],
0 commit comments