(routes, type = 'redirects')
| 8 | const nextConfigPath = join(appDir, 'next.config.js') |
| 9 | |
| 10 | const 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 | |
| 23 | let getStderr |
| 24 | let start |