Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(nextjs): fix createRouteManifest with basePath #17838

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

Open
seoyeon9888 wants to merge 2 commits into getsentry:develop
base: develop
Choose a base branch
Loading
from seoyeon9888:fix/next-sentry-create-route-manifest-basepath-bug

Conversation

Copy link

@seoyeon9888 seoyeon9888 commented Oct 1, 2025
edited by chargome
Loading

fix #17837

add basePath prefix to createRouteManifest

closes #17837

seer-by-sentry[bot] and jh-park-mnetplus reacted with hooray emoji
}

const { dynamicRoutes, staticRoutes } = scanAppDirectory(targetDir, '', options?.includeRouteGroups);
const { dynamicRoutes, staticRoutes } = scanAppDirectory(targetDir, options?.basePath, options?.includeRouteGroups);
Copy link

@cursor cursor bot Oct 1, 2025

Choose a reason for hiding this comment

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

Bug: Route Manifest Cache and Base Path Handling

The createRouteManifest cache doesn't invalidate when the basePath option changes, leading to stale manifests with incorrect route prefixes. Also, passing options?.basePath directly to scanAppDirectory can prefix routes with 'undefined/' when basePath is not provided.

Fix in Cursor Fix in Web

Copy link
Member

chargome commented Oct 1, 2025

Looks good already, would you mind also reflecting this in one of the e2e-tests (dev-packages/e2e-tests/test-applications)?

@chargome chargome self-assigned this Oct 1, 2025
Copy link
Author

seoyeon9888 commented Oct 1, 2025
edited
Loading

Looks good already, would you mind also reflecting this in one of the e2e-tests (dev-packages/e2e-tests/test-applications)?

@chargome

If I apply a basePath to the existing E2E test application, it seems that all transaction assertions and URL paths in the test code would need to include the basePath prefix.
Is this the recommended approach?

Could you provide some guidance on whether it would be better to add tests directly to the existing app, or to create a separate app with basePath enabled for testing purposes?

Copy link
Member

chargome commented Oct 2, 2025
edited
Loading

We can move this into a new next-15-basepath test. Feel free to ping me if I should take this over!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@cursor cursor[bot] cursor[bot] left review comments

At least 1 approving review is required to merge this pull request.

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

nextjs app dir basePath route manifest bug

AltStyle によって変換されたページ (->オリジナル) /