@@ -283,6 +283,7 @@ describe("SSR Streaming — Basic Rendering", () => {
283283 const manifest = { "./Boom.tsx" : { file : "assets/boom.js" } } ;
284284 const LazyBoom = lazy (
285285 ( ) => new Promise < any > ( ( _ , rej ) => setTimeout ( ( ) => rej ( new Error ( "lazy failed" ) ) , 10 ) ) ,
286+ undefined ,
286287 "./Boom.tsx"
287288 ) as any ;
288289
@@ -1226,7 +1227,7 @@ describe("SSR Streaming — Asset Discovery", () => {
12261227 } ;
12271228
12281229 const Home = ( props : any ) => < div > Home Content</ div > ;
1229- const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , "./Home.tsx" ) ;
1230+ const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , undefined , "./Home.tsx" ) ;
12301231 await LazyHome . preload ! ( ) ;
12311232
12321233 function App ( ) {
@@ -1252,7 +1253,7 @@ describe("SSR Streaming — Asset Discovery", () => {
12521253
12531254 test ( "lazy with no manifest throws during render" , async ( ) => {
12541255 const Home = ( props : any ) => < div > Home</ div > ;
1255- const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , "./Home.tsx" ) ;
1256+ const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , undefined , "./Home.tsx" ) ;
12561257 await LazyHome . preload ! ( ) ;
12571258
12581259 function App ( ) {
@@ -1282,8 +1283,8 @@ describe("SSR Streaming — Asset Discovery", () => {
12821283
12831284 const CompA = ( ) => < div > A</ div > ;
12841285 const CompB = ( ) => < div > B</ div > ;
1285- const LazyA = lazy ( ( ) => asyncValue ( { default : CompA } ) , "./A.tsx" ) ;
1286- const LazyB = lazy ( ( ) => asyncValue ( { default : CompB } ) , "./B.tsx" ) ;
1286+ const LazyA = lazy ( ( ) => asyncValue ( { default : CompA } ) , undefined , "./A.tsx" ) ;
1287+ const LazyB = lazy ( ( ) => asyncValue ( { default : CompB } ) , undefined , "./B.tsx" ) ;
12871288 await LazyA . preload ! ( ) ;
12881289 await LazyB . preload ! ( ) ;
12891290
@@ -1320,6 +1321,7 @@ describe("SSR Streaming — Asset Discovery", () => {
13201321 const Comp = ( ) => < div > Streamed</ div > ;
13211322 const LazyComp = lazy (
13221323 ( ) => new Promise < { default : typeof Comp } > ( r => setTimeout ( ( ) => r ( { default : Comp } ) , 20 ) ) ,
1324+ undefined ,
13231325 "./Lazy.tsx"
13241326 ) ;
13251327
@@ -1352,7 +1354,7 @@ describe("SSR Streaming — Asset Discovery", () => {
13521354 } ;
13531355
13541356 const Comp = ( ) => < div > Content</ div > ;
1355- const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , "./Comp.tsx" ) ;
1357+ const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , undefined , "./Comp.tsx" ) ;
13561358 await LazyComp . preload ! ( ) ;
13571359
13581360 function App ( ) {
@@ -1390,7 +1392,7 @@ describe("SSR Streaming — Asset Discovery", () => {
13901392 } ;
13911393
13921394 const InnerComp = ( ) => < span > Inner</ span > ;
1393- const LazyInner = lazy ( ( ) => asyncValue ( { default : InnerComp } , 10 ) , "./Inner.tsx" ) ;
1395+ const LazyInner = lazy ( ( ) => asyncValue ( { default : InnerComp } , 10 ) , undefined , "./Inner.tsx" ) ;
13941396
13951397 const OuterComp = ( ) => (
13961398 < div >
@@ -1405,6 +1407,7 @@ describe("SSR Streaming — Asset Discovery", () => {
14051407 new Promise < { default : typeof OuterComp } > ( r =>
14061408 setTimeout ( ( ) => r ( { default : OuterComp } ) , 20 )
14071409 ) ,
1410+ undefined ,
14081411 "./Outer.tsx"
14091412 ) ;
14101413
@@ -1435,7 +1438,7 @@ describe("SSR Streaming — Asset Discovery", () => {
14351438 } ;
14361439
14371440 const InnerComp = ( ) => < span > InnerContent</ span > ;
1438- const LazyInner = lazy ( ( ) => asyncValue ( { default : InnerComp } , 5 ) , "./Inner.tsx" ) ;
1441+ const LazyInner = lazy ( ( ) => asyncValue ( { default : InnerComp } , 5 ) , undefined , "./Inner.tsx" ) ;
14391442
14401443 function App ( ) {
14411444 const slowData = createMemo ( async ( ) => asyncValue ( "SlowData" , 40 ) ) ;
@@ -1487,8 +1490,8 @@ describe("SSR Streaming — Asset Discovery", () => {
14871490 return < main data-page = "product" > { product ( ) } </ main > ;
14881491 } ;
14891492 const Widget = ( ) => < aside data-widget = "support" > Chat with support</ aside > ;
1490- const LazyRoute = lazy ( ( ) => asyncValue ( { default : Route } ) , "./Route.tsx" ) ;
1491- const LazyWidget = lazy ( ( ) => asyncValue ( { default : Widget } ) , "./Widget.tsx" ) ;
1493+ const LazyRoute = lazy ( ( ) => asyncValue ( { default : Route } ) , undefined , "./Route.tsx" ) ;
1494+ const LazyWidget = lazy ( ( ) => asyncValue ( { default : Widget } ) , undefined , "./Widget.tsx" ) ;
14921495 await LazyRoute . preload ! ( ) ;
14931496 await LazyWidget . preload ! ( ) ;
14941497
@@ -1537,7 +1540,7 @@ describe("SSR Streaming — CSS Asset Handling", () => {
15371540 } ;
15381541
15391542 const Comp = ( ) => < div > Content</ div > ;
1540- const LazyComp = lazy ( ( ) => Promise . resolve ( { default : Comp } ) , "./Comp.tsx" ) ;
1543+ const LazyComp = lazy ( ( ) => Promise . resolve ( { default : Comp } ) , undefined , "./Comp.tsx" ) ;
15411544 await LazyComp . preload ! ( ) ;
15421545 const gate = deferred < string > ( ) ;
15431546
@@ -1580,7 +1583,11 @@ describe("SSR Streaming — CSS Asset Handling", () => {
15801583 } ;
15811584
15821585 const StyledComp = ( ) => < div > Styled</ div > ;
1583- const LazyStyled = lazy ( ( ) => Promise . resolve ( { default : StyledComp } ) , "./Styled.tsx" ) ;
1586+ const LazyStyled = lazy (
1587+ ( ) => Promise . resolve ( { default : StyledComp } ) ,
1588+ undefined ,
1589+ "./Styled.tsx"
1590+ ) ;
15841591 await LazyStyled . preload ! ( ) ;
15851592 const gate = deferred < string > ( ) ;
15861593
@@ -1632,11 +1639,11 @@ describe("SSR Streaming — CSS Asset Handling", () => {
16321639 } ;
16331640
16341641 const CompA = ( ) => < div > A</ div > ;
1635- const LazyA = lazy ( ( ) => asyncValue ( { default : CompA } ) , "./A.tsx" ) ;
1642+ const LazyA = lazy ( ( ) => asyncValue ( { default : CompA } ) , undefined , "./A.tsx" ) ;
16361643 await LazyA . preload ! ( ) ;
16371644
16381645 const CompB = ( ) => < div > B</ div > ;
1639- const LazyB = lazy ( ( ) => Promise . resolve ( { default : CompB } ) , "./B.tsx" ) ;
1646+ const LazyB = lazy ( ( ) => Promise . resolve ( { default : CompB } ) , undefined , "./B.tsx" ) ;
16401647 await LazyB . preload ! ( ) ;
16411648 const gate = deferred < string > ( ) ;
16421649
@@ -1693,7 +1700,7 @@ describe("renderToString — Asset Discovery", () => {
16931700 } ;
16941701
16951702 const Home = ( props : any ) => < div > Home Content</ div > ;
1696- const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , "./Home.tsx" ) ;
1703+ const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , undefined , "./Home.tsx" ) ;
16971704
16981705 const html = renderToString (
16991706 ( ) => (
@@ -1721,7 +1728,7 @@ describe("renderToString — Asset Discovery", () => {
17211728 } ;
17221729
17231730 const Comp = ( ) => < div > Content</ div > ;
1724- const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , "./Comp.tsx" ) ;
1731+ const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , undefined , "./Comp.tsx" ) ;
17251732
17261733 const html = renderToString (
17271734 ( ) => (
@@ -1757,8 +1764,8 @@ describe("renderToString — Asset Discovery", () => {
17571764
17581765 const CompA = ( ) => < div > A</ div > ;
17591766 const CompB = ( ) => < div > B</ div > ;
1760- const LazyA = lazy ( ( ) => asyncValue ( { default : CompA } ) , "./A.tsx" ) ;
1761- const LazyB = lazy ( ( ) => asyncValue ( { default : CompB } ) , "./B.tsx" ) ;
1767+ const LazyA = lazy ( ( ) => asyncValue ( { default : CompA } ) , undefined , "./A.tsx" ) ;
1768+ const LazyB = lazy ( ( ) => asyncValue ( { default : CompB } ) , undefined , "./B.tsx" ) ;
17621769
17631770 const html = renderToString (
17641771 ( ) => (
@@ -1790,7 +1797,7 @@ describe("renderToString — Asset Discovery", () => {
17901797 } ;
17911798
17921799 const Home = ( ) => < div > Home</ div > ;
1793- const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , "./Home.tsx" ) ;
1800+ const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , undefined , "./Home.tsx" ) ;
17941801
17951802 const html = renderToString (
17961803 ( ) => (
@@ -1817,7 +1824,7 @@ describe("renderToString — Asset Discovery", () => {
18171824 } ;
18181825
18191826 const Profile = ( props : any ) => < div > { props . name } </ div > ;
1820- const LazyProfile = lazy ( ( ) => asyncValue ( { default : Profile } ) , "./Profile.tsx" ) ;
1827+ const LazyProfile = lazy ( ( ) => asyncValue ( { default : Profile } ) , undefined , "./Profile.tsx" ) ;
18211828
18221829 function App ( ) {
18231830 const data = createMemo ( ( ) => asyncValue ( "Jon" , 100 ) ) ;
@@ -1848,7 +1855,7 @@ describe("renderToString — Asset Discovery", () => {
18481855
18491856 test ( "lazy with no manifest throws" , ( ) => {
18501857 const Home = ( ) => < div > Home</ div > ;
1851- const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , "./Home.tsx" ) ;
1858+ const LazyHome = lazy ( ( ) => asyncValue ( { default : Home } ) , undefined , "./Home.tsx" ) ;
18521859
18531860 expect ( ( ) =>
18541861 renderToString ( ( ) => (
@@ -1879,7 +1886,7 @@ describe("Entry CSS Auto-Discovery", () => {
18791886 } ;
18801887
18811888 const Comp = ( ) => < div > Content</ div > ;
1882- const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , "./Lazy.tsx" ) ;
1889+ const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , undefined , "./Lazy.tsx" ) ;
18831890 await LazyComp . preload ! ( ) ;
18841891
18851892 function App ( ) {
@@ -1977,7 +1984,7 @@ describe("Entry CSS Auto-Discovery", () => {
19771984 } ;
19781985
19791986 const Comp = ( ) => < div > Styled</ div > ;
1980- const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , "./Styled.tsx" ) ;
1987+ const LazyComp = lazy ( ( ) => asyncValue ( { default : Comp } ) , undefined , "./Styled.tsx" ) ;
19811988 await LazyComp . preload ! ( ) ;
19821989
19831990 function App ( ) {
@@ -2117,6 +2124,7 @@ describe("SSR — Fragment wrapping props.children", () => {
21172124 new Promise < { default : typeof HomeContent } > ( r =>
21182125 setTimeout ( ( ) => r ( { default : HomeContent } ) , 10 )
21192126 ) ,
2127+ undefined ,
21202128 "./Home"
21212129 ) ;
21222130
0 commit comments