File tree Expand file tree Collapse file tree 6 files changed +1368
-14
lines changed Expand file tree Collapse file tree 6 files changed +1368
-14
lines changed Original file line number Diff line number Diff line change 88 "start" : " NODE_ENV=production next start"
99 },
1010 "dependencies" : {
11- "@module-federation/nextjs-mf" : " 5.11.5 " ,
11+ "@module-federation/nextjs-mf" : " 6.0.7 " ,
1212 "lodash" : " 4.17.21" ,
1313 "next" : " 12.2.2" ,
14- "next-compose-plugins" : " ^ 2.2.1" ,
14+ "next-compose-plugins" : " 2.2.1" ,
1515 "nextjs-shared" : " file:../shared" ,
16- "react" : " ^ 18.2.0" ,
17- "react-dom" : " ^ 18.2.0" ,
16+ "react" : " 18.2.0" ,
17+ "react-dom" : " 18.2.0" ,
1818 "webpack" : " 5.72.1" ,
1919 "webpack-merge" : " ^5.8.0"
2020 }
Original file line number Diff line number Diff line change 88 "start" : " NODE_ENV=production next start -p 3001"
99 },
1010 "dependencies" : {
11- "@module-federation/nextjs-mf" : " 5.11.5 " ,
11+ "@module-federation/nextjs-mf" : " 6.0.7 " ,
1212 "lodash" : " 4.17.21" ,
1313 "next" : " 12.2.2" ,
14- "next-compose-plugins" : " ^ 2.2.1" ,
14+ "next-compose-plugins" : " 2.2.1" ,
1515 "nextjs-shared" : " file:../shared" ,
16- "react" : " ^ 18.2.0" ,
17- "react-dom" : " ^ 18.2.0" ,
16+ "react" : " 18.2.0" ,
17+ "react-dom" : " 18.2.0" ,
1818 "webpack" : " 5.72.1" ,
1919 "webpack-merge" : " ^5.8.0"
2020 }
Original file line number Diff line number Diff line change 88 "start" : " NODE_ENV=production next start -p 3002"
99 },
1010 "dependencies" : {
11- "@module-federation/nextjs-mf" : " 5.11.5 " ,
11+ "@module-federation/nextjs-mf" : " 6.0.7 " ,
1212 "lodash" : " 4.17.21" ,
1313 "next" : " 12.2.2" ,
14- "next-compose-plugins" : " ^ 2.2.1" ,
14+ "next-compose-plugins" : " 2.2.1" ,
1515 "nextjs-shared" : " file:../shared" ,
16- "react" : " ^ 18.2.0" ,
17- "react-dom" : " ^ 18.2.0" ,
16+ "react" : " 18.2.0" ,
17+ "react-dom" : " 18.2.0" ,
1818 "webpack" : " 5.72.1" ,
1919 "webpack-merge" : " ^5.8.0"
2020 }
Original file line number Diff line number Diff line change 1+ import { Suspense } from "react" ;
12import App from 'next/app' ;
23import dynamic from 'next/dynamic' ;
3- const Nav = dynamic ( ( ) => import ( 'home/nav' ) ) ;
4+ const Nav = dynamic ( ( ) => import ( 'home/nav' ) , { suspense : true } ) ;
45
56function MyApp ( { Component, pageProps } ) {
67 return (
78 < >
9+ < Suspense fallback = { 'loading' } >
810 < Nav />
11+ </ Suspense >
912 < Component { ...pageProps } />
1013 </ >
1114 ) ;
1215}
16+
1317MyApp . getInitialProps = async ctx => {
1418 const appProps = await App . getInitialProps ( ctx ) ;
1519 return appProps ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const Shop = props => (
3232 </ div >
3333) ;
3434Shop . getInitialProps = async ( ) => {
35- const swapi = await fetch ( 'https://swapi.dev/api/people/1 ' ) . then ( res => res . json ( ) ) ;
35+ const swapi = await fetch ( 'https://jsonplaceholder.typicode.com/todos/2 ' ) . then ( res => res . json ( ) ) ;
3636 return swapi ;
3737} ;
3838export default Shop ;
You can’t perform that action at this time.
0 commit comments