Skip to content
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

[MPDX-8445] Next.js v15 upgrade #1212

Merged
merged 3 commits into from
Nov 25, 2024
Merged

[MPDX-8445] Next.js v15 upgrade #1212

merged 3 commits into from
Nov 25, 2024

Conversation

canac
Copy link
Contributor

@canac canac commented Nov 22, 2024

Description

Upgrade to Next.js v15. There are lots of breaking changes in the v15 release but not in features that we are using: https://nextjs.org/docs/app/building-your-application/upgrading/version-15.

I only needed to remove the swcMinify config option that started defaulting to true in Next.js 13 and was removed in Next.js 15.

I also migrated next.config.js to next.config.ts now that Next.js supports TypeScript config files.

MPDX-8445

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

Copy link
Contributor

github-actions bot commented Nov 22, 2024

Bundle sizes [mpdx-react]

Compared against 51a722f

Route Size (gzipped) Diff
/404 82.5 KB +1007 B
/500 82.46 KB +1006 B
/_app 371.56 KB -4.42 KB
/accountLists 120.18 KB +1003 B
/accountLists/[accountListId]/contacts/flows/setup 166 KB +1.08 KB
/accountLists/[accountListId]/settings/admin 132.32 KB +1.14 KB
/accountLists/[accountListId]/settings/integrations 155.52 KB +1.06 KB
/accountLists/[accountListId]/settings/manageAccounts 138.19 KB +1.11 KB
/accountLists/[accountListId]/settings/manageCoaches 134.86 KB +1.14 KB
/accountLists/[accountListId]/settings/notifications 134.27 KB +1.09 KB
/accountLists/[accountListId]/settings/organizations 133.79 KB +1.14 KB
/accountLists/[accountListId]/tools/appeals 183.11 KB +1.05 KB
/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]] 159.24 KB +1.08 KB
/accountLists/[accountListId]/tools/fix/phoneNumbers/[[...contactId]] 140.88 KB +1.07 KB
/accountLists/[accountListId]/tools/import/google 154.34 KB +1.08 KB
/accountLists/[accountListId]/tools/import/tnt 149.33 KB +1.07 KB
/login 120.42 KB +1023 B
/logout 82.29 KB +1013 B
/setup/connect 125.84 KB +1.14 KB

@canac canac added the Preview Environment Add this label to create an Amplify Preview label Nov 22, 2024
Copy link
Contributor

Preview branch generated at https://8445-nextjs-15-upgrade.d3dytjb8adxkk5.amplifyapp.com

@canac canac requested a review from dr-bizz November 22, 2024 20:58
@canac canac force-pushed the 8445-nextjs-14-upgrade branch from e78d950 to 9d00bc4 Compare November 25, 2024 15:31
Base automatically changed from 8445-nextjs-14-upgrade to main November 25, 2024 15:58
It started defaulting to true in Next.js 13 and appears to have been
removed in Next.js 15
https://nextjs.org/docs/pages/building-your-application/upgrading/version-13#v13-summary
The env property now accepts undefined values, so compact is no longer
needed.
@canac canac force-pushed the 8445-nextjs-15-upgrade branch from dc3eef6 to 4cb39e9 Compare November 25, 2024 16:00
@canac canac self-assigned this Nov 25, 2024
Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It mentions that fetch requests are not cached by default. I know we don't use fetch much and might not need to add caching but thought it was worth noting.

The code and the web ap look great.

Also it looks like swcMinify is allowed in Next.js 15 - https://nextjs.org/docs/messages/swc-minify-enabled

@canac
Copy link
Contributor Author

canac commented Nov 25, 2024

It mentions that fetch requests are not cached by default. I know we don't use fetch much and might not need to add caching but thought it was worth noting.

@dr-bizz The only places I saw that we were making fetch requests on the server were by Apollo for GraphQL requests. Since GraphQL uses the POST method and Next.js only cached GET requests, we shouldn't be affected by this change.

Also it looks like swcMinify is allowed in Next.js 15 - https://nextjs.org/docs/messages/swc-minify-enabled

That link is just additional info for an error message generated by older Next.js versions. Here's the PR that removed swcMinify: vercel/next.js#65690.

@canac canac requested a review from dr-bizz November 25, 2024 20:22
@canac canac merged commit 47446f2 into main Nov 25, 2024
18 checks passed
@canac canac deleted the 8445-nextjs-15-upgrade branch November 25, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Preview Environment Add this label to create an Amplify Preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants