File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
packages/runtime/src/helpers Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ type NetlifyHeaders = NetlifyConfig['headers']
19
19
20
20
export interface RequiredServerFiles {
21
21
version ?: number
22
+ relativeAppDir ?: string
22
23
config ?: NextConfigComplete
23
24
appDir ?: string
24
25
files ?: string [ ]
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { getHandler } from '../templates/getHandler'
22
22
import { getResolverForPages , getResolverForSourceFiles } from '../templates/getPageResolver'
23
23
24
24
import { ApiConfig , extractConfigFromFile , isEdgeConfig } from './analysis'
25
+ import { getRequiredServerFiles } from './config'
25
26
import { getDependenciesOfFile , getServerFile , getSourceFileForPage } from './files'
26
27
import { writeFunctionConfiguration } from './functionsMetaData'
27
28
import { pack } from './pack'
@@ -226,22 +227,17 @@ export const setupImageFunction = async ({
226
227
}
227
228
228
229
const traceRequiredServerFiles = async ( publish : string ) : Promise < string [ ] > => {
229
- const requiredServerFilesPath = join ( publish , 'required-server-files.json' )
230
230
const {
231
231
files,
232
232
relativeAppDir,
233
233
config : {
234
234
experimental : { outputFileTracingRoot } ,
235
235
} ,
236
- } = ( await readJSON ( requiredServerFilesPath ) ) as {
237
- files : string [ ]
238
- relativeAppDir : string
239
- config : { experimental : { outputFileTracingRoot : string } }
240
- }
236
+ } = await getRequiredServerFiles ( publish )
241
237
const appDirRoot = join ( outputFileTracingRoot , relativeAppDir )
242
238
const absoluteFiles = files . map ( ( file ) => join ( appDirRoot , file ) )
243
239
244
- absoluteFiles . push ( requiredServerFilesPath )
240
+ absoluteFiles . push ( join ( publish , 'required-server-files.json' ) )
245
241
246
242
return absoluteFiles
247
243
}
You can’t perform that action at this time.
0 commit comments