-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Next.js 12 #606
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Wow. I'm surprised how little had to change in our code... almost nothing; mostly config changes. CR 👍 Thanks @federicobadini |
Compared this preview and the main branch and confirmed the following are identical:
General:
Browsers:
Everything looks good and behaves identical to the main branch EXCEPT, the mobile hamburger menu isn't opening on this branch. dev_block 🧷 It's not working on Safari or Chrome on mobile and tablet screen sizes. There aren't any errors in the console when clicking on the menu button, it just doesn't open. On iOS (image from iOS/Safari 15 on iPhone 13), after clicking on and failing to open the hamburger menu, the iFixit logo gets rendered like this: Screen recordingsAndroid + Chrome screenRecording-11-7-2022-11-31.mp4iOS + Safari screenRecording-11-7-2022-11-32.mp4 |
41a5b57
to
29528b3
Compare
Fixed the drawer issue |
CR 👍 Conflicts though. |
Solved |
un_dev_block 🛩️ |
QA 😺 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR ✌🏻
The project has been updated to Next.js 12 and is now using the SWC compiler.
Jest tests however are still run via
babel-jest
/next/babel
.This is due to the fact that SWC strictly adhere to the ESModules specification so, according to how a module is declared, we may have difficulties in mocking up functions. Here is an example:
Function 1 is exported via named export, but since it is imported with a namespace notation, it ends up being not modifiable. So any mocking will fail.
This is tracked in several issues:
swc-project/swc#5205
swc-project/swc#3843 (comment)
jestjs/jest#9430
There seems to be a plugin specifically designed to solve this issue but currently overriding .swcrc in Next is not admitted
For those reasons I decided to - at least temporarily - continue using Babel for the Jest transform
cc @ardelato
QA