Skip to content

Commit 7c23568

Browse files
committed
fix: strip query string when matching path for prebundling react
1 parent a766105 commit 7c23568

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime/src/templates/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const getNetlifyNextServer = (NextServer: NextServerType) => {
7474
const appPathsManifest = this.getAppPathsManifest?.()
7575

7676
const routes = routesManifest && [...routesManifest.staticRoutes, ...routesManifest.dynamicRoutes]
77-
const matchedRoute = routes?.find((route) => new RegExp(route.regex).test(path))
77+
const matchedRoute = routes?.find((route) => new RegExp(route.regex).test(path.split('?')[0]))
7878
const isAppRoute =
7979
appPathsManifest && matchedRoute ? appPathsManifest[joinPaths(matchedRoute.page, 'page')] : false
8080

0 commit comments

Comments
 (0)