File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ import { locales } from "@workspace/i18n/config";
66const handleI18nRouting = createMiddleware ( routing ) ;
77
88export default async function middleware ( req : NextRequest ) {
9- // Skip i18n for /breakpoint/* paths
10- if ( req . nextUrl . pathname . startsWith ( "/breakpoint" ) ) {
9+ // Skip i18n for /breakpoint/* and /templates/* paths
10+ if (
11+ req . nextUrl . pathname . startsWith ( "/breakpoint" ) ||
12+ req . nextUrl . pathname . startsWith ( "/templates" )
13+ ) {
1114 return NextResponse . next ( ) ;
1215 }
1316
@@ -52,6 +55,8 @@ export default async function middleware(req: NextRequest) {
5255}
5356
5457export const config = {
55- matcher : [ "/((?!api|opengraph|_next|_vercel|breakpoint|.*\\..*).*)" ] ,
58+ matcher : [
59+ "/((?!api|opengraph|_next|_vercel|breakpoint|templates|.*\\..*).*)" ,
60+ ] ,
5661 runtime : "nodejs" ,
5762} ;
You can’t perform that action at this time.
0 commit comments