MCPcopy
hub / github.com/vercel/next.js / writeConfig

Function writeConfig

test/integration/invalid-custom-routes/test/index.test.ts:10–21  ·  view source on GitHub ↗
(routes, type = 'redirects')

Source from the content-addressed store, hash-verified

8const nextConfigPath = join(appDir, 'next.config.js')
9
10const writeConfig = async (routes, type = 'redirects') => {
11 await fs.writeFile(
12 nextConfigPath,
13 `
14 module.exports = {
15 async ${type}() {
16 return ${JSON.stringify(routes)}
17 }
18 }
19 `
20 )
21}
22
23let getStderr
24let start

Callers 1

runTestsFunction · 0.70

Calls 2

writeFileMethod · 0.65
stringifyMethod · 0.45

Tested by

no test coverage detected