File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed
packages/next-swc/crates/next-transform-dynamic/src Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -326,7 +326,6 @@ impl Fold for NextDynamicPatcher {
326326 } ) ) ) ] ;
327327
328328 let mut has_ssr_false = false ;
329- let mut has_suspense = false ;
330329
331330 if expr. args . len ( ) == 2 {
332331 if let Expr :: Object ( ObjectLit {
@@ -359,33 +358,17 @@ impl Fold for NextDynamicPatcher {
359358 has_ssr_false = true
360359 }
361360 }
362- if sym == "suspense" {
363- if let Some ( Lit :: Bool ( Bool {
364- value : true ,
365- span : _,
366- } ) ) = value. as_lit ( )
367- {
368- has_suspense = true
369- }
370- }
371361 }
372362 }
373363 }
374364 props. extend ( options_props. iter ( ) . cloned ( ) ) ;
375365 }
376366 }
377367
378- // Don't strip the `loader` argument if suspense is true
379- // See https://github.com/vercel/next.js/issues/36636 for background.
380-
381368 // Also don't strip the `loader` argument for server components (both
382369 // server/client layers), since they're aliased to a
383370 // React.lazy implementation.
384- if has_ssr_false
385- && !has_suspense
386- && self . is_server_compiler
387- && !self . is_react_server_layer
388- {
371+ if has_ssr_false && self . is_server_compiler && !self . is_react_server_layer {
389372 expr. args [ 0 ] = Lit :: Null ( Null { span : DUMMY_SP } ) . as_arg ( ) ;
390373 }
391374
You can’t perform that action at this time.
0 commit comments