diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index c4ef80b224d5d..627c94f5bd663 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -17,8 +17,7 @@ import { isDynamicRoute } from './utils/is-dynamic' import { getRouteMatcher } from './utils/route-matcher' import { getRouteRegex } from './utils/route-regex' -// @ts-ignore variable is always a string -const basePath: string = process.env.__NEXT_ROUTER_BASEPATH +const basePath = process.env.__NEXT_ROUTER_BASEPATH as string export function addBasePath(path: string): string { return path.indexOf(basePath) !== 0 ? basePath + path : path