Skip to content

Commit 356e0b8

Browse files
committed
chore: cleanup
1 parent 59249ac commit 356e0b8

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/helpers/config.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { readFile } from 'node:fs/promises'
22

33
import { TASK_DIR } from './constants.js'
4-
import { loadManifest } from './files.js'
5-
import type { RequiredServerFiles } from './types.js'
64

75
/**
86
* Enable standalone mode at build-time
@@ -27,25 +25,3 @@ export const setRequestConfig = async () => {
2725
// set config
2826
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(runtimeConfig.config)
2927
}
30-
// to-do: add types and build error handling
31-
export const getNextConfig = async function getNextConfig({
32-
publish,
33-
}: {
34-
publish: string
35-
}, netlifyConfig): Promise<NextConfig> {
36-
try {
37-
const { config, appDir, ignore }: RequiredServerFiles = JSON.parse(await readFile(`${publish}/required-server-files.json`, 'utf-8'))
38-
if (!config) {
39-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
40-
// @ts-ignore
41-
return new Error('Error loading your Next config')
42-
}
43-
44-
const routesManifest = await loadManifest(netlifyConfig, 'routes-manifest.json')
45-
46-
// If you need access to other manifest files, you can add them here as well
47-
return { ...config, appDir, ignore, routesManifest }
48-
} catch{
49-
return new Error('Error loading your Next config')
50-
}
51-
}

src/helpers/files.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import pLimit from 'p-limit'
1414
import { netliBlob, getNormalizedBlobKey } from './blobs.cjs'
1515
import { BUILD_DIR, STANDALONE_BUILD_DIR } from './constants.js'
1616

17-
1817
// readfile not available in esm version of fs-extra
1918
const { readFile } = pkg
2019
/**

0 commit comments

Comments
 (0)