Skip to content

Commit fb76b06

Browse files
committed
feat: allow skipping of middleware handling
1 parent b434021 commit fb76b06

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/helpers/files.ts

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export const matchesRewrite = (file: string, rewrites: Rewrites): boolean => {
6060
}
6161

6262
export const getMiddleware = async (publish: string): Promise<Array<string>> => {
63+
if (process.env.NEXT_SKIP_MIDDLEWARE) {
64+
return []
65+
}
6366
const manifestPath = join(publish, 'server', 'middleware-manifest.json')
6467
if (existsSync(manifestPath)) {
6568
const manifest = await readJson(manifestPath, { throws: false })

0 commit comments

Comments
 (0)