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

feat(nextjs): Add support for Next.js 13 app router #385

Merged
merged 5 commits into from
Sep 5, 2023

Conversation

mayank1513
Copy link
Contributor

@mayank1513 mayank1513 commented Jul 29, 2023

@mayank1513
Copy link
Contributor Author

Also fixes #241

@lforst
Copy link
Member

lforst commented Aug 3, 2023

Hey, thanks for this PR. We are very likely gonna merge it but I will hold off for a bit because I am planning on adding API routes support very soon and then we can drop the special casing.

@mayank1513
Copy link
Contributor Author

Hey, thanks for this PR. We are very likely gonna merge it but I will hold off for a bit because I am planning on adding API routes support very soon and then we can drop the special casing.

Thanks.

Can I help in adding support for route handlers?

@lforst
Copy link
Member

lforst commented Aug 3, 2023

Hey, thanks for this PR. We are very likely gonna merge it but I will hold off for a bit because I am planning on adding API routes support very soon and then we can drop the special casing.

Thanks.

Can I help in adding support for route handlers?

Yes of course. PRs are always welcome!

@andycansdale
Copy link

andycansdale commented Aug 5, 2023

Just to add to this, I spent a number of hours trying to debug why my middleware suddenly stopped working when installing Sentry using the wizard. I eventually tracked it down to the addition of a pages folder on my root. As I am using a src/ directory for my app folder, middleware, etc. this caused the middleware to not be run.

A possible solution might be add a step that asks the user if they are using a src folder, or perhaps check the location of the existing app directory. Not sure if it's relevant, but my app did not have a pages directory before it was added by Sentry since we are using the app router for everything.

@mayank1513
Copy link
Contributor Author

Just to add to this, I spent a number of hours trying to debug why my middleware suddenly stopped working when installing Sentry using the wizard. I eventually tracked it down to the addition of a pages folder on my root. As I am using a src/ directory for my app folder, middleware, etc. this caused the middleware to not be run.

A possible solution might be add a step that asks the user if they are using a src folder, or perhaps check the location of the existing app directory. Not sure if it's relevant, but my app did not have a pages directory before it was added by Sentry since we are using the app router for everything.

This is taken care of in this PR.

@github-actions
Copy link

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@mayank1513
Copy link
Contributor Author

Hi, I think we have waited enough for updates to sentry core functionality -> out of box support for app directory route handlers. I think we shouldn't block this PR for that. This would be against agile principles.

@lforst
Copy link
Member

lforst commented Aug 28, 2023

@mayank1513 We will still go with the plan and merge this when route handlers are working.

Last week most of Sentry was in a hackathon and we didn't operate as usual so things should speed up again now.

@lforst lforst changed the title Add support for next.js13 app router feat(nextjs): Add support for Next.js 13 app router Aug 31, 2023
@lforst lforst merged commit c359a96 into getsentry:master Sep 5, 2023
8 checks passed
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.

Next.js 13 app router + @sentry/wizard breaks typing
3 participants