@@ -577,6 +577,58 @@ test.describe("Prerendering", () => {
577577 expect ( html ) . toMatch ( '<h2 data-route="true">About</h2>' ) ;
578578 expect ( html ) . toMatch ( '<p data-loader-data="true">About Loader Data</p>' ) ;
579579 } ) ;
580+
581+ test ( "Permits a concurrency option" , async ( ) => {
582+ fixture = await createFixture ( {
583+ prerender : true ,
584+ files : {
585+ ...files ,
586+ "react-router.config.ts" : js `
587+ export default {
588+ prerender: {
589+ paths: ['/', '/about'],
590+ unstable_concurrency: 2,
591+ },
592+ }
593+ ` ,
594+ "vite.config.ts" : js `
595+ import { defineConfig } from "vite";
596+ import { reactRouter } from "@react-router/dev/vite";
597+
598+ export default defineConfig({
599+ build: { manifest: true },
600+ plugins: [
601+ reactRouter()
602+ ],
603+ });
604+ ` ,
605+ } ,
606+ } ) ;
607+ appFixture = await createAppFixture ( fixture ) ;
608+
609+ let clientDir = path . join ( fixture . projectDir , "build" , "client" ) ;
610+ expect ( listAllFiles ( clientDir ) . sort ( ) ) . toEqual ( [
611+ "_root.data" ,
612+ "about.data" ,
613+ "about/index.html" ,
614+ "favicon.ico" ,
615+ "index.html" ,
616+ ] ) ;
617+
618+ let res = await fixture . requestDocument ( "/" ) ;
619+ let html = await res . text ( ) ;
620+ expect ( html ) . toMatch ( "<title>Index Title: Index Loader Data</title>" ) ;
621+ expect ( html ) . toMatch ( "<h1>Root</h1>" ) ;
622+ expect ( html ) . toMatch ( '<h2 data-route="true">Index</h2>' ) ;
623+ expect ( html ) . toMatch ( '<p data-loader-data="true">Index Loader Data</p>' ) ;
624+
625+ res = await fixture . requestDocument ( "/about" ) ;
626+ html = await res . text ( ) ;
627+ expect ( html ) . toMatch ( "<title>About Title: About Loader Data</title>" ) ;
628+ expect ( html ) . toMatch ( "<h1>Root</h1>" ) ;
629+ expect ( html ) . toMatch ( '<h2 data-route="true">About</h2>' ) ;
630+ expect ( html ) . toMatch ( '<p data-loader-data="true">About Loader Data</p>' ) ;
631+ } ) ;
580632 } ) ;
581633
582634 test . describe ( "ssr: true" , ( ) => {
0 commit comments