Skip to content

Commit 8672efc

Browse files
author
Luca Forstner
authored
fix(nextjs): Correctly handle ts middleware files (#6816)
1 parent 660d4bb commit 8672efc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nextjs/src/config/loaders/wrappingLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function wrappingLoader(
6868
}
6969

7070
const middlewareJsPath = path.join(pagesDir, '..', 'middleware.js');
71-
const middlewareTsPath = path.join(pagesDir, '..', 'middleware.js');
71+
const middlewareTsPath = path.join(pagesDir, '..', 'middleware.ts');
7272

7373
let templateCode: string;
7474
if (parameterizedRoute.startsWith('/api')) {

0 commit comments

Comments
 (0)