Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
feedthejim committed Oct 20, 2022
1 parent dafc2ef commit 9924568
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/next/server/require.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@ import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plug
import { PageNotFoundError, MissingStaticPage } from '../shared/lib/utils'
import LRUCache from 'next/dist/compiled/lru-cache'

const pagePathCache = new LRUCache<string, string | null>({
max: 1000,
})
const pagePathCache =
process.env.NODE_ENV === 'development'
? {
get: (_key: string) => {
return null
},
set: () => {},
has: () => false,
}
: new LRUCache<string, string | null>({
max: 1000,
})

export function getMaybePagePath(
page: string,
Expand Down

0 comments on commit 9924568

Please sign in to comment.