forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix router isReady and react 18 not being detected with no config (ve…
…rcel#35762) This fixes `router.isReady` being incorrect in dev mode due to the `isAutoExport` field being false from `hasConcurrentFeatures` being flagged similar to the static 404 in vercel#35749. While investigating this I also noticed we aren't properly detecting react 18 when no `next.config.js` is present. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: vercel#35754 x-ref: vercel#35749
- Loading branch information
Showing
6 changed files
with
76 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { useRouter } from 'next/router' | ||
|
||
export default function Page(props) { | ||
const router = useRouter() | ||
return ( | ||
<> | ||
<p>auto-export router.isReady</p> | ||
<p id="query">{JSON.stringify(router.query)}</p> | ||
<p id="ready">{router.isReady ? 'yes' : 'no'}</p> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useRouter } from 'next/router' | ||
|
||
export default function Page(props) { | ||
const router = useRouter() | ||
return ( | ||
<> | ||
<p>getStaticProps router.isReady</p> | ||
<p id="query">{JSON.stringify(router.query)}</p> | ||
<p id="ready">{router.isReady ? 'yes' : 'no'}</p> | ||
</> | ||
) | ||
} | ||
|
||
export function getStaticProps() { | ||
return { | ||
props: { | ||
now: Date.now(), | ||
}, | ||
} | ||
} |