File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed
tests/fixture/transform/export-from/page Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -327,13 +327,13 @@ impl VisitMut for NextSuperJsonTransformer {
327327 ModuleItem :: ModuleDecl ( ModuleDecl :: ExportDefaultExpr (
328328 ExportDefaultExpr { expr, .. } ,
329329 ) ) => {
330- keep_page = self . use_init_props ;
330+ keep_page = true ;
331331 * expr = expr. take ( ) . wrap_page ( ) ;
332332 }
333333 ModuleItem :: ModuleDecl ( ModuleDecl :: ExportDefaultDecl (
334334 ExportDefaultDecl { decl, .. } ,
335335 ) ) => {
336- keep_page = self . use_init_props ;
336+ keep_page = true ;
337337 // TODO: remove duplicate code
338338 match decl {
339339 DefaultDecl :: Class ( class_expr) => {
@@ -421,11 +421,7 @@ impl VisitMut for NextSuperJsonTransformer {
421421 span : DUMMY_SP ,
422422 } ) ,
423423 ) ;
424- if !self . use_init_props {
425- new_items. push ( new_page) ;
426- } else {
427- temp_page = Some ( new_page) ;
428- }
424+ temp_page = Some ( new_page) ;
429425
430426 // export { Page as default }
431427 // =>
@@ -438,11 +434,7 @@ impl VisitMut for NextSuperJsonTransformer {
438434 span : DUMMY_SP ,
439435 } ) ,
440436 ) ;
441- if !self . use_init_props {
442- new_items. push ( new_page) ;
443- } else {
444- temp_page = Some ( new_page) ;
445- }
437+ temp_page = Some ( new_page) ;
446438 }
447439 }
448440
Original file line number Diff line number Diff line change 11import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools" ;
22import { foo as _NEXT_SUPERJSON_IMPORTED_PAGE } from 'source' ;
3- export default _withSuperJSONPage ( _NEXT_SUPERJSON_IMPORTED_PAGE ) ;
4- export { getServerSideProps } from 'source' ;
3+ export { getServerSideProps } from 'source' ;
4+ export default _withSuperJSONPage ( _NEXT_SUPERJSON_IMPORTED_PAGE ) ;
You can’t perform that action at this time.
0 commit comments