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

NoJira: NextJS Runtime Plugin 5.2 Compatibility #28

Merged
merged 4 commits into from
May 14, 2024

Conversation

sherakama
Copy link
Member

@sherakama sherakama commented May 2, 2024

READY FOR REVIEW

Summary

  • Messing with the function includes to add the .env file breaks the builds with @netlify/plugin-nextjs version 5.2
  • This change removes the addition of that rule and also removes the removing of the .env file from the build as the neltify plugin does the cleanup for us.

Review By (Date)

  • EOW of the week of May 6

Steps to test

  • Pull this branch into your build.
  • Ensure build still builds
  • Ensure SSR works
  • Ensure API's still have the env var values

Resources

@ericbakenhus
Copy link

@sherakama Dropping this into MA with no other changes and clearing the Netlify build cache results in a successful build and a (seemingly) working app. 👍

If I bump Next.js up to version 13.5 it builds, but things start to break. Might not be related, but I'm still looking into it. 🤷

@sherakama
Copy link
Member Author

If I bump Next.js up to version 13.5 it builds, but things start to break. Might not be related, but I'm still looking into it. 🤷

Possibly that the .env file is missing from some functions?

@stfurkan
Copy link
Contributor

If I bump Next.js up to version 13.5 it builds, but things start to break. Might not be related, but I'm still looking into it. 🤷

Possibly that the .env file is missing from some functions?

@sherakama @ericbakenhus It works with [email protected] for https://next-give.netlify.app

@ericbakenhus
Copy link

If I bump Next.js up to version 13.5 it builds, but things start to break. Might not be related, but I'm still looking into it. 🤷

Possibly that the .env file is missing from some functions?

Yeah, that sounds about right. 😭

@sherakama
Copy link
Member Author

If I bump Next.js up to version 13.5 it builds, but things start to break. Might not be related, but I'm still looking into it. 🤷

Possibly that the .env file is missing from some functions?

Yeah, that sounds about right. 😭

I created a test build at https://github.com/SU-SWS/adapt-my-account/pull/1212 to see if the variables are showing up and it looks like they do with the exception of the edge function but that is a known thing.

I'm going to add the versions as peerDependencies and roll this as a major release.

package.json Outdated
Comment on lines 31 to 32
"@netlify/plugin-nextjs": ">5",
"next": ">13.5.6"
Copy link
Member Author

Choose a reason for hiding this comment

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

Assuming forward compatibility after these versions.

"@netlify/plugin-nextjs": ">5",
"next": ">13.5.6"
},
"peerDependenciesMeta": {
Copy link
Member Author

Choose a reason for hiding this comment

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

Added as peerDependencies and set the meta to optional so the package manager doesn't get angry.

@sherakama
Copy link
Member Author

Thanks for all the testing and feedback everyone. Moving forward with this version.

@sherakama sherakama merged commit 74f9c66 into dev May 14, 2024
1 check passed
@sherakama sherakama deleted the nojira/nextjs-plugin-5 branch May 14, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants