Skip to content

Commit 008014a

Browse files
committed
fix: don't include unneeded _app pages in ISR
1 parent 118bf89 commit 008014a

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

packages/runtime/src/helpers/functions.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -227,18 +227,6 @@ export const setupImageFunction = async ({
227227
}
228228
}
229229

230-
const traceNextPages = async (pages: string[], publish: string): Promise<string[]> => {
231-
const requiredFiles = await Promise.all(
232-
pages.map(async (page) => {
233-
const path = join(publish, 'server', 'pages', `${page}.js`)
234-
const dependencies = await getDependenciesOfFile(path)
235-
return [path, ...dependencies]
236-
}),
237-
)
238-
239-
return requiredFiles.flat(1)
240-
}
241-
242230
const traceRequiredServerFiles = async (publish: string): Promise<string[]> => {
243231
const requiredServerFilesPath = join(publish, 'required-server-files.json')
244232
const {
@@ -301,9 +289,6 @@ export const getAPIPRouteCommonDependencies = async (publish: string) => {
301289
traceRequiredServerFiles(publish),
302290
traceNextServer(publish),
303291

304-
// for some reason, ISR needs them
305-
traceNextPages(['_document', '_app'], publish),
306-
307292
// used by our own bridge.js
308293
traceNPMPackage('follow-redirects', publish),
309294
])

0 commit comments

Comments
 (0)