-
Notifications
You must be signed in to change notification settings - Fork 23
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 nextjs example to NextJS 14 #1718
Conversation
Signed-off-by: Steve Ayers <sayers@buf.build>
ec1619f
to
73f576a
Compare
Once connectrpc/connect-es#1159 is merged and released, we can upgrade these examples to use the new peer deps. |
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.
Can you check that we're using Next.js like intended?
IIRC v14 adds a path alias to tsconfig.json. We should use @-imports if that's what Next.js defaults to.
From what I remember, v14 also uses an mjs file for the config, and next-env.d.ts should be git-ignored (we should be using the .gitignore Next.js scaffolds).
Regenerated a Next.js app using v14 and all suggested defaults. Hopefully this should be adhering to v14 patterns. |
Looks great! Keeping the scaffolded files up-to-date is super helpful for users setting up a project, and it gives us confidence that we're compatible. I don't think we should use Tailwind though 😬 I didn't realize that Tailwind is actually fine, but we shouldn't have Tailwind on board and then use CSS modules instead. I guess we opted for CSS modules because it's much more simple, and we don't care about CSS in our examples. So we should either remove Tailwind, or port the styles to use Tailwind. |
Signed-off-by: Steve Ayers <sayers@buf.build>
Signed-off-by: Steve Ayers <sayers@buf.build>
Signed-off-by: Steve Ayers <sayers@buf.build>
Signed-off-by: Steve Ayers <sayers@buf.build>
Signed-off-by: Steve Ayers <sayers@buf.build>
Signed-off-by: Steve Ayers <sayers@buf.build>
e8aa104
to
80d5877
Compare
Removed Tailwind (and PostCSS) in favor of the previous CSS modules we've always used. Also updated the README to reflect that we opted out of Tailwind. |
Nice, let's release the upstream update and get this merged. |
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
This updates the example in
nextjs
to use Next.js v14. A few minor changes to accommodate v14:getMessages
function we use for a fake DB had to be refactored to accept a cookie instead of doing the lookup inside: See https://nextjs.org/docs/app/api-reference/functions/unstable_cacheserverActions
are no longer experimental and are the default so that was removed from the nextjs config file.