Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(routing): treat basePath as a literal prefix

Open Beginner friendly
#3,920 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
69/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
next.js, typescript, vite
Domain
backend

Research direction

Start with the upstream commit linked in the issue, then locate request routing code and its routing tests. Check where basePath is removed before route matching and add coverage for paths containing regex metacharacters. Done means removal treats the configured value literally, respects prefix boundaries, and the routing tests confirm matching after removal.

Written by the indexing model from the issue text.

Description

nextjs-tracking

Upstream

https://github.com/vercel/next.js/commit/a9437d1d42961c638e6d0ca7382aab5d0c77b5c2

Problem

Prefix removal must not interpolate basePath into an unescaped regular expression. Valid base paths containing regular-expression metacharacters can otherwise be stripped incorrectly before route matching.

Expected behavior

Remove the configured base path with literal, boundary-aware prefix logic throughout request routing.

Coverage

Add routing coverage for base paths containing regex metacharacters and verify matching after the prefix is removed.

Dominant language
TypeScript
Stars
9.2k
Forks
441
Avg merge
1d 9h
Merged PRs (30d)
392

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/vinext

All issues in cloudflare/vinext

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.