Unverified Commit dccff3a8 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Enable preloading entries by default (#65289)

This enables the preloading entries on start flag by default as it has a
great benefit to preload eagerly when starting the server instead of
lazily when requests come in which makes the user eat the module
initialization time.

Closes NEXT-3303
parent 01826678
...@@ -889,7 +889,7 @@ export const defaultConfig: NextConfig = { ...@@ -889,7 +889,7 @@ export const defaultConfig: NextConfig = {
linkNoTouchStart: false, linkNoTouchStart: false,
caseSensitiveRoutes: false, caseSensitiveRoutes: false,
appDocumentPreloading: undefined, appDocumentPreloading: undefined,
preloadEntriesOnStart: undefined, preloadEntriesOnStart: true,
clientRouterFilter: true, clientRouterFilter: true,
clientRouterFilterRedirects: false, clientRouterFilterRedirects: false,
fetchCacheKeyPrefix: '', fetchCacheKeyPrefix: '',
......
...@@ -229,7 +229,11 @@ export default class NextNodeServer extends BaseServer< ...@@ -229,7 +229,11 @@ export default class NextNodeServer extends BaseServer<
}).catch(() => {}) }).catch(() => {})
} }
if (!options.dev && this.nextConfig.experimental.preloadEntriesOnStart) { if (
!options.dev &&
!this.minimalMode &&
this.nextConfig.experimental.preloadEntriesOnStart
) {
this.unstable_preloadEntries() this.unstable_preloadEntries()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment