-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix _document and getInitialProps with React 18 (#35736)
* wip * update test * fix _document logic for edge runtime and rsc * revert deleted file * fix lint error * fix * remove doc gip test * Revert "remove doc gip test" This reverts commit a5fd1d7. * fix test Co-authored-by: Jiachi Liu <[email protected]>
- Loading branch information
Showing
5 changed files
with
159 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
module.exports = { | ||
const path = require('path') | ||
|
||
let withReact18 = (config) => config | ||
|
||
try { | ||
// only used when running inside of the monorepo not when isolated | ||
withReact18 = require(path.join( | ||
__dirname, | ||
'../../../integration/react-18/test/with-react-18' | ||
)) | ||
} catch (_) {} | ||
|
||
module.exports = withReact18({ | ||
compiler: { | ||
styledComponents: true, | ||
}, | ||
} | ||
}) |
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