-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/app router #213
Feature/app router #213
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Some notes as you review:
packages/nextjs/app/about/page.tsx
Outdated
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.
From migration guide -- create basic routes and put old pages as client components
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.
from migration guide -- old pages are now client side components. Future work entails moving client components to leaf nodes of component tree
packages/nextjs/middleware.ts
Outdated
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.
setCacheHeader
was called in serverSideProps [example] but you can no longer do that. Based on this discussion, I've opted for middleware.
🖐️ I need help verifying this will still work with Fastly
@@ -19,7 +19,7 @@ jobs: | |||
- uses: actions/checkout@v2 | |||
- uses: actions/setup-node@v2 | |||
with: | |||
node-version: 16.x | |||
node-version: 18.x |
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.
Bumped node version as part of these changes here + in our vercel env
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.
Nice work! Upgrading to app/router isn't as simple as they make it, but this looks good.
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.
(as mentioned in DMs) Do we have tests that use MSW? Can we get MSW to work with Next 14 / App Router?
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.
mswjs/msw#1644 and vercel/next.js#56446 are in ongoing discussions, so this does not currently work 😢
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.
I think we should move forward without fixing it. It’s a good cautionary tale about moving to AppRouter. And it will provide a good challenge in the future, once MSW/Next fixes compatibility.
What
Move to app router
Why
Latest and greatest!
Resources
Migration guide from Vercel team: https://nextjs.org/docs/app/building-your-application/upgrading/app-router-migration
Testing
Need to validate Fastly cache didn't break
Future work
next/image
use client;
to leaf nodes